Optimizing SELECT Statements 5. Construct the range based on the first and second key parts ( f1 = 2 AND f2 > 40 ). 6. Perform a range scan. Using this strategy decreases the number of accessed rows because MySQL skips the rows that do not qualify for each constructed range. This Skip Scan access method is applicable under the following conditions: •Table T has at least one compound index with key parts of the form ([A_1, ..., A_ k ,] B_1, ..., B_ m , C [, D_1, ..., D_ n ]). Key parts A and D may be empty, but B and C must be nonempty. •The query references only one table. •The query does not use  GROUP BY  or  DISTINCT . •The query references only columns in the index. •The predicates on A_1, ..., A_ k  must be equality predicates and they must be constants. This includes the  IN()  operator. •The query must be a conjunctive query; that is, an  AND  of  OR  conditions:  ( cond1 ( key_part1 ) OR cond2 ( key_part1 )) AND ( cond1 ( key_part2 ) OR ...) AND ... •There must be a range condition on C. •Conditions on D columns are permitted. Conditions on D must be in conjunction with the range condition on C. • Using index for skip scan  in the  Extra  column indicates that the loose index Skip Scan access method is used. •If the index can be used for Skip Scan, the index should be visible in the  possible_keys  column. Use of Skip Scan is indicated in  EXPLAIN  output as follows: Use of Skip Scan is indicated in optimizer trace output by a  "skip scan"  element of this form: You may also see a  "best_skip_scan_summary"  element. If Skip Scan is chosen as the best range access variant, a  "chosen_range_access_summary"  is written. If Skip Scan is chosen as the overall best access method, a  "best_access_path"  element is present. Use of Skip Scan is subject to the value of the  skip_scan  flag of the  optimizer_switch  system variable. See Section 8.9.2, “Switchable Optimizations” . By default, this flag is  on . To disable it, set skip_scan  to  off . In addition to using the  optimizer_switch  system variable to control optimizer use of Skip Scan session-wide, MySQL supports optimizer hints to influence the optimizer on a per-statement basis. See Section 8.9.3, “Optimizer Hints” . The optimizer is able to apply the range scan access method to queries of this form: Range Optimization of Row Constructor Expressions 1649 "skip_scan_range": { "type": "skip_scan", "index":  index_used_for_skip_scan , "key_parts_used_for_access": [ key_parts_used_for_access ], "range": [ range ] }