Previous Topic Next topic Print topic


IN LIST with a Range Condition

If an IN LIST exists in conjunction with a range condition, a compound index can be used. In the following example, there is an index on columns A, B and C in TABLE1:

SELECT * FROM table1 
    WHERE a = 3 
      AND b IN (6,7) 
      AND c BETWEEN 2 AND 20;
Previous Topic Next topic Print topic