summaryrefslogtreecommitdiff
path: root/sql/opt_index_cond_pushdown.cc
Commit message (Collapse)AuthorAgeFilesLines
* 5.3 mergeSergei Golubchik2012-02-211-2/+12
|\
| * Backport of:Sergey Petrunya2012-02-161-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timestamp: Thu 2011-12-01 15:12:10 +0100 Fix for Bug#13430436 PERFORMANCE DEGRADATION IN SYSBENCH ON INNODB DUE TO ICP When running sysbench on InnoDB there is a performance degradation due to index condition pushdown (ICP). Several of the queries in sysbench have a WHERE condition that the optimizer uses for executing these queries as range scans. The upper and lower limit of the range scan will ensure that the WHERE condition is fulfilled. Still, the WHERE condition is part of the queries' condition and if ICP is enabled the condition will be pushed down to InnoDB as an index condition. Due to the range scan's upper and lower limits ensure that the WHERE condition is fulfilled, the pushed index condition will not filter out any records. As a result the use of ICP for these queries results in a performance overhead for sysbench. This overhead comes from using resources for determining the part of the condition that can be pushed down to InnoDB and overhead in InnoDB for executing the pushed index condition. With the default configuration for sysbench the range scans will use the primary key. This is a clustered index in InnoDB. Using ICP on a clustered index provides the lowest performance benefit since the entire record is part of the clustered index and in InnoDB it has the highest relative overhead for executing the pushed index condition. The fix for removing the overhead ICP introduces when running sysbench is to disable use of ICP when the index used by the query is a clustered index. When WL#6061 is implemented this change should be re-evaluated.
* | fix the include guards and add missing gplv2 headersSergei Golubchik2012-02-171-0/+16
| |
* | 5.3 mergeSergei Golubchik2012-01-131-0/+5
|\ \ | |/
| * Fixed LP bug #904832.Igor Babaev2011-12-181-0/+5
| | | | | | | | | | Do not perform index condition pushdown for conditions containing subqueries and stored functions.
* | 5.3->5.5 mergeSergei Golubchik2011-11-221-35/+55
|\ \ | |/
| * Fixed LP bug #886145.Igor Babaev2011-11-061-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug happened because in some cases the function JOIN::exec did not save the value of TABLE::pre_idx_push_select_cond in TABLE::select->pre_idx_push_select_cond for the sort table. Noticed and fixed a bug in the function make_cond_remainder that builds the remainder condition after extraction of an index pushdown condition from the where condition. The code erroneously assumed that the function make_cond_for_table left the value of ICP_COND_USES_INDEX_ONLY in sub-condition markers. Adjusted many result files from the regression test suite after this fix .
| * Backported the fix and the test case for bug 12822678 from the mysql-5.6 ↵Igor Babaev2011-11-011-1/+2
| | | | | | | | | | | | | | code line. Fixed a bug in select_describe. Adjusted results for affected test cases.
| * Downported InnoDB support of Index Condition Pushdown from MySQL-5.6 code line.Igor Babaev2011-05-251-27/+38
| |
* | merge with 5.3Sergei Golubchik2011-10-191-10/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * Post-review fixes for the patch that added the code allowing to useIgor Babaev2011-01-211-11/+7
| | | | | | | | | | hash join over equi-join conditions without supporting indexes.
| * Fixed LP bug#694092.Igor Babaev2010-12-241-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the function make_cond_for_index() was mistaken when detecting index only pushdown conditions for a table: a pushdown condition that was not index only could be marked as such. It happened because the procedure erroneously used the markers for index only conditions that remained from the calls of this function that extracted the index conditions for other tables. Fixed by erasing index only markers as soon as they are need anymore.
| * Merge MWL#121-125 DS-MRR improvements into MWL#128 Classic hash join treeSergey Petrunya2010-11-151-0/+1
| |\
| | * Merge MWL#121-124 DS-MRR support for key-ordered reads + MWL#128 BNL-Hash joinSergey Petrunya2010-11-011-0/+1
| | |\
| | | * BUG#625841: Assertion `!table || (!table->read_set || bitmap_is_setSergey Petrunya2010-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | - When find_all_keys() checks which table columns are needed for table scan that is done before the sorting, it should also analyze pushed index condition. This is achieved by remembering/checking pre-index-pushed condition.
| * | | MergeIgor Babaev2010-11-101-2/+5
| |\ \ \ | | |/ /
| | * | Fixed bug #54539.Igor Babaev2010-10-011-2/+5
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a possibility not to factor out the condition pushed to the access index out of the condition pushed to a joined table. This is useful for the condition pushed to the index when a hashed join buffer for BKA is employed. In this case the index condition may be false for some, but for all records with the same key. So the condition must be checked not only after index lookup, but after fetching row data as well, and it makes sense not to factor out the condition from the condition checked after reading row data, The bug happened because the condition pushed to an index always was factor out from the condition pushed to the accessed table.
* | | lots of post-merge changesSergei Golubchik2011-04-251-1/+1
| | |
* | | merge.Sergei Golubchik2010-11-251-1/+1
|/ / | | | | | | | | | | checkpoint. does not compile.
* | Fixed LP bug #668644.Igor Babaev2010-11-081-1/+1
|/ | | | | | | | | | The pushdown condition for the sorted table in a query can be complemented by the conditions from HAVING. This transformation is done in JOIN::exec pretty late after the original pushdown condition have been saved in the field pre_idx_push_select_cond for the sorted table. So this field must be updated after the inclusion of the condition from HAVING.
* Merge MWL#67: MRR Backport and BKA backport.Sergey Petrunya2009-12-221-4/+0
|
* MWL#67: MRR backportSergey Petrunya2009-12-221-0/+391
- Make index condition pushdown be controlled by an @@optimizer_switch flag, not by @@engine_condition_pushdown - Make MRR buffer size be controlled by @@mrr_buffer_size, not by @@read_rnd_buffer_size - Move parts of code to separate files - Code cleanup - Add --sorted_result to some SELECTs in tests.