code reorg for Transactionw!
[csql.git] / test / sql / Optimizer / int_composite.sql
blob72e86899eb97e331c08439d443cfef26c3c10c22
1 echo create table t1(f1 int, f2 int, f3 int, f4 int);
2 create table t1(f1 int, f2 int, f3 int, f4 int);
3 echo create index hashintf1f2f3 on t1(f2,f3,f1) hash;
4 create index hashintf1f2f3 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);