summaryrefslogtreecommitdiff
path: root/mysql-test/r/select_found.result
diff options
context:
space:
mode:
authorigor@olga.mysql.com <>2007-08-02 12:45:56 -0700
committerigor@olga.mysql.com <>2007-08-02 12:45:56 -0700
commitcf39429295846cf944e3fd1a327c554ebd08942d (patch)
treecb69ff6598e568046e57c591baf10d4a49f2d5b7 /mysql-test/r/select_found.result
parent642b0c00ed99334a5540839c0e6598d7a26c8ac7 (diff)
downloadmariadb-git-cf39429295846cf944e3fd1a327c554ebd08942d.tar.gz
Fixed bug#28404.
This patch adds cost estimation for the queries with ORDER BY / GROUP BY and LIMIT. If there was a ref/range access to the table whose rows were required to be ordered in the result set the optimizer always employed this access though a scan by a different index that was compatible with the required order could be cheaper to produce the first L rows of the result set. Now for such queries the optimizer makes a choice between the cheapest ref/range accesses not compatible with the given order and index scans compatible with it.
Diffstat (limited to 'mysql-test/r/select_found.result')
-rw-r--r--mysql-test/r/select_found.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result
index 7abd65beb46..7896f8a9f4e 100644
--- a/mysql-test/r/select_found.result
+++ b/mysql-test/r/select_found.result
@@ -84,7 +84,7 @@ UNIQUE KEY e_n (email,name)
EXPLAIN SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system PRIMARY,kid NULL NULL NULL 0 const row not found
-1 SIMPLE t2 index NULL e_n 104 NULL 200
+1 SIMPLE t2 index NULL e_n 104 NULL 10
SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10;
email
email1