Oracle 5.0 Reference Manual page 682

Table of Contents

Advertisement

If the used indexes don't cover all columns used in the query, full rows are retrieved only when the
range conditions for all used keys are satisfied.
If one of the merged conditions is a condition over a primary key of an
used for row retrieval, but is used to filter out rows retrieved using other conditions.
8.3.1.4.2. The Index Merge Union Access Algorithm
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
range conditions on different keys combined with
• In this form, where the index has exactly
key_part1=const1
• Any range condition over a primary key of an
• A condition for which the Index Merge method intersection algorithm is applicable.
Examples:
SELECT * FROM t1 WHERE key1=1 OR key2=2 OR key3=3;
SELECT * FROM
(key3='foo' AND key4='bar') AND key5=5;
8.3.1.4.3. The Index Merge Sort-Union Access Algorithm
This access algorithm is employed when the
combined by
Examples:
SELECT * FROM
SELECT * FROM
WHERE
(key_col1
The difference between the sort-union algorithm and the union algorithm is that the sort-union algorithm
must first fetch row IDs for all rows and sort them before returning any rows.
8.3.1.5. Engine Condition Pushdown Optimization
This optimization improves the efficiency of direct comparisons between a nonindexed column and
a constant. In such cases, the condition is "pushed down" to the storage engine for evaluation. This
optimization can be used only by the
For MySQL Cluster, this optimization can eliminate the need to send nonmatching rows over the
network between the cluster's data nodes and the MySQL Server that issued the query, and can speed
up queries where it is used by a factor of 5 to 10 times over cases where condition pushdown could be
but is not used.
Suppose that a MySQL Cluster table is defined as follows:
CREATE TABLE t1 (
a INT,
b INT,
KEY(a)
) ENGINE=NDBCLUSTER;
Condition pushdown can be used with queries such as the one shown here, which includes a
comparison between a nonindexed column and a constant:
Optimizing
AND
key_part2=const2
innodb_table
WHERE (key1=1 AND key2=2) OR
[881], but for which the Index Merge method union algorithm is not applicable.
OR
tbl_name
WHERE
key_col1
tbl_name
> 10 OR
key_col2
Statements
SELECT
[881], and each condition is one of the following:
OR
parts (that is, all index parts are covered):
N
... AND
key_partN=constN
or
InnoDB
BDB
clause was converted to several range conditions
WHERE
< 10 OR
key_col2
= 20) AND nonkey_col=30;
storage engine.
NDBCLUSTER
662
or
InnoDB
BDB
clause was converted to several
WHERE
table.
< 20;
table, it is not

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents