Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have optimizer_switch variable as

mysql> show variables like 'optimizer_switch';
+------------------+-------------------------------------------------------------------------------------------+
| Variable_name    | Value                                                                                     |
+------------------+-------------------------------------------------------------------------------------------+
| optimizer_switch | index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on |
+------------------+-------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Now I wants to enable index_condition_pushdown so how i will do it.

I also wants to know how this variable help in query execution plan. How it speed up a query..?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Index_Condition_Pushdown is used for Queries with the range, ref, eq_ref, and ref_or_null access methods, i.e when there is a need to access full table rows.

Where as Index Condition Pushdown is enabled by default; it can be controlled with the optimizer_switch system variable by setting the index_condition_pushdown flag.

To Switch:

 SET [GLOBAL|SESSION] optimizer_switch='command[,command]...';

for more you could read here: http://dev.mysql.com/doc/refman/5.6/en/index-condition-pushdown-optimization.html

and http://dev.mysql.com/doc/refman/5.6/en/switchable-optimizations.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.