We know the order of the columns in a composite index will determine the usage of the index or not against a table. A query will use a composite index only if the where clause of the query has at least the leading/left-most columns of the index in it. But, it is far more complicated in correlated subquery situations. Let’s have an example SQL to elaborate the details in the following.
SELECT D.*
FROM department D
WHERE EXISTS (SELECT Count(*)
How is the order of the columns in a composite index affecting a subquery performance for Oracle?
SELECT D.*
FROM department D
WHERE EXISTS (SELECT Count(*)
FROM...
How is the order of the columns in a composite index affecting a subquery performance for Oracle?