diff options
author | unknown <monty@mashka.mysql.fi> | 2003-06-27 03:04:54 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-06-27 03:04:54 +0300 |
commit | 8d224783402f3a10886d1617e6afa566f9771a14 (patch) | |
tree | 6fef037dd6b940bf2ed11b3042a97c08dc6b364c /mysql-test/r/distinct.result | |
parent | 2de2917bce42fdb1ff3c421067cbb2afc4844bec (diff) | |
download | mariadb-git-8d224783402f3a10886d1617e6afa566f9771a14.tar.gz |
Added thread variable max_seeks_for_key
Change optimizer to prefer key lookups before table scan
Change table scans to be done after tables with constrains on scanned table
mysql-test/r/distinct.result:
Update results
mysql-test/r/group_by.result:
Update results
mysql-test/r/heap.result:
Update results
mysql-test/r/join.result:
Update results
mysql-test/r/key_diff.result:
Update results
mysql-test/r/myisam.result:
Update results
mysql-test/r/order_by.result:
Update results
mysql-test/r/select_safe.result:
Update results
mysql-test/t/distinct.test:
Change test to be repeatable
mysql-test/t/join.test:
Change test to be repeatable
mysql-test/t/select_safe.test:
Add tests for MAX_SEEKS_FOR_KEY
sql/handler.h:
Optimize structure for 64 bit machines (and to avoid problems with gdb)
sql/item_cmpfunc.cc:
Initialize not_null_tables_cache properly
sql/mysqld.cc:
Added max_seeks_for_key
sql/set_var.cc:
Added max_seeks_for_key
sql/sql_class.h:
Added max_seeks_for_key
sql/sql_select.cc:
Added max_seeks_for_key
Change optimizer to prefer key lookups before table scan.
Change table scans to be done after tables with constrains on scanned table
Diffstat (limited to 'mysql-test/r/distinct.result')
-rw-r--r-- | mysql-test/r/distinct.result | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 5f4f7cced1e..53a20eeea0b 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -161,7 +161,7 @@ SELECT DISTINCT UserId FROM t1 WHERE UserId=22; UserId drop table t1; CREATE TABLE t1 (a int(10) unsigned not null primary key,b int(10) unsigned); -INSERT INTO t1 VALUES (1,1),(2,1); +INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1); CREATE TABLE t2 (a int(10) unsigned not null, key (A)); INSERT INTO t2 VALUES (1),(2); CREATE TABLE t3 (a int(10) unsigned, key(A), b text); @@ -189,7 +189,7 @@ insert into t4 select * from t3; insert into t3 select * from t4; explain select distinct t1.a from t1,t3 where t1.a=t3.a; table type possible_keys key key_len ref rows Extra -t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary +t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary t3 ref a a 5 t1.a 10 Using where; Using index; Distinct select distinct t1.a from t1,t3 where t1.a=t3.a; a @@ -200,16 +200,16 @@ select distinct 1 from t1,t3 where t1.a=t3.a; 1 explain SELECT distinct t1.a from t1; table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +t1 index NULL PRIMARY 4 NULL 4 Using index explain SELECT distinct t1.a from t1 order by a desc; table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +t1 index NULL PRIMARY 4 NULL 4 Using index explain SELECT t1.a from t1 group by a order by a desc; table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +t1 index NULL PRIMARY 4 NULL 4 Using index explain SELECT distinct t1.a from t1 order by a desc limit 1; table type possible_keys key key_len ref rows Extra -t1 index NULL PRIMARY 4 NULL 2 Using index +t1 index NULL PRIMARY 4 NULL 4 Using index explain SELECT distinct a from t3 order by a desc limit 2; table type possible_keys key key_len ref rows Extra t3 index NULL a 5 NULL 204 Using index |