Spec-Zone .ru
спецификации, руководства, описания, API
|
The applicability criteria for this algorithm are similar to those for the Index Merge method intersection
algorithm. The algorithm can be employed when the table's WHERE
clause was
converted to several range conditions on different keys combined with OR
, and each condition is one of the following:
In this form, where the index has exactly N
parts (that is, all index parts are covered):
key_part1
=const1
ANDkey_part2
=const2
... ANDkey_partN
=constN
Any range condition over a primary key of an InnoDB
table.
A condition for which the Index Merge method intersection algorithm is applicable.
Examples:
SELECT * FROM t1 WHEREkey1
=1 ORkey2
=2 ORkey3
=3;SELECT * FROMinnodb_table
WHERE (key1
=1 ANDkey2
=2) OR (key3
='foo' ANDkey4
='bar') ANDkey5
=5;