code reorg for Transactionw!
[csql.git] / test / sql / Optimizer / date_composite.sql
blob63cf29dce8089a01f6216ed524b97c7333f0c6bc
1 echo create table t1(f1 date, f2 date, f3 date, f4 date);
2 create table t1(f1 date, f2 date, f3 date, f4 date);
3 echo create index hashdatef1f2f3 on t1(f2,f3,f1) hash;
4 create index hashdatef1f2f3 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 = '2003-03-03';
8 explain plan select * from t1 where f1 = '2003-03-03';
9 echo explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03';
10 explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03';
11 echo explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03' and f3='2003-03-03';
12 explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03' and f3='2003-03-03';
13 echo explain plan select * from t1 where f1 = '2003-03-03' or f2='2003-03-03' or f3='2003-03-03';
14 explain plan select * from t1 where f1 = '2003-03-03' or f2='2003-03-03' or f3='2003-03-03';
15 echo explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03' or f3='2003-03-03';
16 explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03' or f3='2003-03-03';
17 echo explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03' and not(f3='2003-03-03');
18 explain plan select * from t1 where f1 = '2003-03-03' and f2='2003-03-03' and not(f3='2003-03-03');
19 echo explain plan select * from t1 where f1 in('2003-03-03','2003-03-03','2003-03-03') and f2='2003-03-03' and not(f3='2003-03-03');
20 explain plan select * from t1 where f1 in('2003-03-03','2003-03-03','2003-03-03') and f2='2003-03-03' and not(f3='2003-03-03');
21 echo explain plan select * from t1 where f1 in('2003-03-03','2003-03-08','2003-03-12') and (f2 between '2003-03-03' and '2003-03-03') and not(f3='2003-03-03');
22 explain plan select * from t1 where f1 in('2003-03-03','2003-03-08','2003-03-12') and (f2 between '2003-03-03' and '2003-03-03') and not(f3='2003-03-03');
23 echo explain plan select * from t1 where f1 in('2003-03-08','2003-03-12','2003-03-03') or (f2 between '2003-03-03' and '2003-03-03') or not(f3='2003-03-03');
24 explain plan select * from t1 where f1 in('2003-03-08','2003-03-12','2003-03-03') or (f2 between '2003-03-03' and '2003-03-03') or not(f3='2003-03-03');
25 echo explain plan select * from t1 where f1 in('2003-03-03','2003-03-12','2003-03-08') or (f2 between '2003-03-03' and '2003-03-03') and not(f3='2003-03-03');
26 explain plan select * from t1 where f1 in('2003-03-03','2003-03-12','2003-03-08') or (f2 between '2003-03-03' and '2003-03-03') and not(f3='2003-03-03');