adding test scripts
[csql.git] / test / sql / Optimizer / tiny_composite.sql
blob583084a4ff028a7f28a0aafb7f0afdaca8073ac5
1 echo create table t1(f1 tinyint, f2 tinyint, f3 tinyint, f4 tinyint);
2 create table t1(f1 tinyint, f2 tinyint, f3 tinyint, f4 tinyint);
3 echo create index hashtinyf1f2f3 on t1(f2,f3,f1) hash;
4 create index hashtinyf1f2f3 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 = 2;
8 explain plan select * from t1 where f1 = 2;
9 echo explain plan select * from t1 where f1 = 2 and f2=2;
10 explain plan select * from t1 where f1 = 2 and f2=2;
11 echo explain plan select * from t1 where f1 = 2 and f2=2 and f3=2;
12 explain plan select * from t1 where f1 = 2 and f2=2 and f3=2;
13 echo explain plan select * from t1 where f1 = 2 or f2=2 or f3=2;
14 explain plan select * from t1 where f1 = 2 or f2=2 or f3=2;
15 echo explain plan select * from t1 where f1 = 2 and f2=2 or f3=2;
16 explain plan select * from t1 where f1 = 2 and f2=2 or f3=2;
17 echo explain plan select * from t1 where f1 = 2 and f2=2 and not(f3=2);
18 explain plan select * from t1 where f1 = 2 and f2=2 and not(f3=2);
19 echo explain plan select * from t1 where f1 in(1,2,3) and f2=2 and not(f3=2);
20 explain plan select * from t1 where f1 in(1,2,3) and f2=2 and not(f3=2);
21 echo explain plan select * from t1 where f1 in(1,2,3) and (f2 between 2 and 4) and not(f3=2);
22 explain plan select * from t1 where f1 in(1,2,3) and (f2 between 2 and 4) and not(f3=2);
23 echo explain plan select * from t1 where f1 in(1,2,3) or (f2 between 2 and 4) or not(f3=2);
24 explain plan select * from t1 where f1 in(1,2,3) or (f2 between 2 and 4) or not(f3=2);
25 echo explain plan select * from t1 where f1 in(1,2,3) or (f2 between 2 and 4) and not(f3=2);
26 explain plan select * from t1 where f1 in(1,2,3) or (f2 between 2 and 4) and not(f3=2);