summaryrefslogtreecommitdiff
path: root/mysql-test/r/update.result
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2010-06-23 00:32:29 +0400
committerGleb Shchepa <gshchepa@mysql.com>2010-06-23 00:32:29 +0400
commitda4d23277f94d9b952cc38504f30014945b3f216 (patch)
tree80a563de65cd97436e44b18e7f1b0dc143bca887 /mysql-test/r/update.result
parenta4baec5c13ae533f8521b96d3e3d2df113129df3 (diff)
downloadmariadb-git-da4d23277f94d9b952cc38504f30014945b3f216.tar.gz
Bug #30584: delete with order by and limit clauses does not
use limit efficiently Bug #36569: UPDATE ... WHERE ... ORDER BY... always does a filesort even if not required Also two bugs reported after QA review (before the commit of bugs above to public trees, no documentation needed): Bug #53737: Performance regressions after applying patch for bug 36569 Bug #53742: UPDATEs have no effect after applying patch for bug 36569 Execution of single-table UPDATE and DELETE statements did not use the same optimizer as was used in the compilation of SELECT statements. Instead, it had an optimizer of its own that did not take into account that you can omit sorting by retrieving rows using an index. Extra optimization has been added: when applicable, single-table UPDATE/DELETE statements use an existing index instead of filesort. A corresponding SELECT query would do the former. Also handling of the DESC ordering expression has been added when reverse index scan is applicable. From now on most single table UPDATE and DELETE statements show the same disk access patterns as the corresponding SELECT query. We verify this by comparing the result of SHOW STATUS LIKE 'Sort% Currently the get_index_for_order function a) checks quick select index (if any) for compatibility with the ORDER expression list or b) chooses the cheapest available compatible index, but only if the index scan is cheaper than filesort. Second way is implemented by the new test_if_cheaper_ordering function (extracted part the test_if_skip_sort_order()).
Diffstat (limited to 'mysql-test/r/update.result')
-rw-r--r--mysql-test/r/update.result4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index 006eaba4e69..6c3f54fca38 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -306,8 +306,8 @@ Handler_read_first 0
Handler_read_key 0
Handler_read_next 0
Handler_read_prev 0
-Handler_read_rnd 1
-Handler_read_rnd_next 9
+Handler_read_rnd 0
+Handler_read_rnd_next 0
alter table t1 disable keys;
flush status;
delete from t1 order by a limit 1;