1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
monty@mashka.mysql.fi
2003-06-27 03:04:54 +03:00
parent 5f556f11e0
commit 34919a03c4
17 changed files with 114 additions and 65 deletions

View File

@ -335,12 +335,12 @@ t1 1 c_2 1 c A 5 NULL NULL YES BTREE
t1 1 c_2 2 a A 5 NULL NULL BTREE
explain select * from t1,t2 where t1.a=t2.a;
table type possible_keys key key_len ref rows Extra
t1 ALL a NULL NULL NULL 5
t2 ALL a NULL NULL NULL 2 Using where
t2 ALL a NULL NULL NULL 2
t1 ALL a NULL NULL NULL 4 Using where
explain select * from t1,t2 force index(a) where t1.a=t2.a;
table type possible_keys key key_len ref rows Extra
t2 ALL a NULL NULL NULL 2
t1 ALL a NULL NULL NULL 5 Using where
t1 ALL a NULL NULL NULL 4 Using where
explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a;
table type possible_keys key key_len ref rows Extra
t2 ALL a NULL NULL NULL 2
@ -351,8 +351,8 @@ t2 ALL b NULL NULL NULL 2
t1 ref b b 5 t2.b 1 Using where
explain select * from t1,t2 force index(c) where t1.a=t2.a;
table type possible_keys key key_len ref rows Extra
t1 ALL a NULL NULL NULL 5
t2 ALL NULL NULL NULL NULL 2 Using where
t2 ALL NULL NULL NULL NULL 2
t1 ALL a NULL NULL NULL 4 Using where
explain select * from t1 where a=0 or a=2;
table type possible_keys key key_len ref rows Extra
t1 ALL a NULL NULL NULL 5 Using where