code reorg for Transactionw!
[csql.git] / test / sql / Optimizer / varchar_composite.sql
blobcf8eb09bfc26be3765a727f44f08bb4330af299d
1 echo create table t1(f1 varchar, f2 varchar, f3 varchar, f4 varchar);
2 create table t1(f1 varchar, f2 varchar, f3 varchar, f4 varchar);
3 echo create index hashvarcharf1f2f3 on t1(f2,f3,f1) hash;
4 create index hashvarcharf1f2f3 on t1(f2,f3,f1) hash;
5 echo explain plan select * from t1;
6 explain plan select * from t1;
7 echo explain plan select * from t1 where f1 = 'a';
8 explain plan select * from t1 where f1 = 'a';
9 echo explain plan select * from t1 where f1 = 'a' and f2='a';
10 explain plan select * from t1 where f1 = 'a' and f2='a';
11 echo explain plan select * from t1 where f1 = 'a' and f2='a' and f3='a';
12 explain plan select * from t1 where f1 = 'a' and f2='a' and f3='a';
13 echo explain plan select * from t1 where f1 = 'a' or f2='a' or f3='a';
14 explain plan select * from t1 where f1 = 'a' or f2='a' or f3='a';
15 echo explain plan select * from t1 where f1 = 'a' and f2='a' or f3='a';
16 explain plan select * from t1 where f1 = 'a' and f2='a' or f3='a';
17 echo explain plan select * from t1 where f1 = 'a' and f2='a' and not(f3='a');
18 explain plan select * from t1 where f1 = 'a' and f2='a' and not(f3='a');
19 echo explain plan select * from t1 where f1 in('a','a','a') and f2='a' and not(f3='a');
20 explain plan select * from t1 where f1 in('a','a','a') and f2='a' and not(f3='a');
21 echo explain plan select * from t1 where f1 in('a','b','c') and f2 like 'a%' and not(f3='d');
22 explain plan select * from t1 where f1 in('a','b','c') and f2 like 'a%' and not(f3='d');
23 echo explain plan select * from t1 where f1 in('b','c','a') or f2 like 'a%' or not(f3='d');
24 explain plan select * from t1 where f1 in('b','c','a') or f2 like 'a%' or not(f3='d');
25 echo explain plan select * from t1 where f1 in('a','c','b') or f2 like 'a%' and not(f3='d');
26 explain plan select * from t1 where f1 in('a','c','b') or f2 like 'a%' and not(f3='d');