USE accounts INDEX on account_no TAG outstanding FOR balance > 0 EXPLAIN SELECT * FROM accounts WHERE balance > 0 Optimized using for condition on tag 'OUTSTANDING'
Recital 10 enhances the SQL optimizer. Now, production indexes with a FOR <conditions> will be used to optimize SQL SELECT statements. If a WHERE <condition> on a SELECT statement matches a FOR <condition> on an index tag, this index will be used to optimize the query. The WHERE <condition> must be an exact match with the FOR <condition>. For example;