adding test scripts
[csql.git] / test / sql / Optimizer / hash_singleprrdicate.sql
blob0e4477dbb6ac7f7d0dac4c4cb3fbfbbfee92da06
1 echo create table t1(f1 tinyint, f2 smallint, f3 int, f4 bigint, f5 char(10), f6 varchar(10), f7 date, f8 time);
2 create table t1(f1 tinyint, f2 smallint, f3 int, f4 bigint, f5 char(10), f6 varchar(10), f7 date, f8 time);
3 echo create index hashtiny on t1(f1) hash;
4 create index hashtiny on t1(f1) hash;
5 echo create index hashsmall on t1(f2) hash;
6 create index hashsmall on t1(f2) hash;
7 echo create index hashint on t1(f3) hash;
8 create index hashint on t1(f3) hash;
9 echo create index hashbig on t1(f4) hash;
10 create index hashbig on t1(f4) hash;
11 echo create index hashchar on t1(f5) hash;
12 create index hashchar on t1(f5) hash;
13 echo create index hashvarchar on t1(f6) hash;
14 create index hashvarchar on t1(f6) hash;
15 echo create index hashdate on t1(f7) hash;
16 create index hashdate on t1(f7) hash;
17 echo create index hashtime on t1(f8) hash;
18 create index hashtime on t1(f8) hash;
19 insert into t1 values(1,11,111,1111,'CSQL1','Lakshya1','2001-11-12','01:21:00');
20 insert into t1 values(2,22,222,2222,'CSQL2','Lakshya2','2002-11-12','02:21:00');
21 insert into t1 values(3,33,333,3333,'CSQL3','Lakshya3','2003-11-12','03:21:00');
22 insert into t1 values(4,44,444,4444,'CSQL4','Lakshya4','2004-11-12','04:21:00');
23 insert into t1 values(5,55,555,5555,'CSQL5','Lakshya5','2005-11-12','05:21:00');
24 echo explain plan select * from t1;  
25 explain plan select * from t1;  
26 echo explain plan select * from t1 where f1 = 2;
27 explain plan select * from t1 where f1 = 2;
28 echo explain plan select * from t1 where f1 < 3;
29 explain plan select * from t1 where f1 < 3;
30 echo explain plan select * from t1 where f2 = 22;
31 explain plan select * from t1 where f2 = 22;
32 echo explain plan select * from t1 where f2 > 33;
33 explain plan select * from t1 where f2 > 33;
34 echo explain plan select * from t1 where f3 = 333;
35 explain plan select * from t1 where f3 = 333;
36 echo explain plan select * from t1 where f3 <> 333;
37 explain plan select * from t1 where f3 <> 333;
38 echo explain plan select * from t1 where f4 = 4444;
39 explain plan select * from t1 where f4 = 4444;
40 echo explain plan select * from t1 where f4 != 4444;
41 explain plan select * from t1 where f4 != 4444;
42 echo explain plan select * from t1 where f5 = 'CSQL3';
43 explain plan select * from t1 where f5 = 'CSQL3';
44 echo explain plan select * from t1 where f5 <= 'CSQL3'; 
45 explain plan select * from t1 where f5 <= 'CSQL3'; 
46 echo explain plan select * from t1 where f6 = 'Lakshya3';
47 explain plan select * from t1 where f6 = 'Lakshya3';
48 echo explain plan select * from t1 where f6 >= 'Lakshya3';
49 explain plan select * from t1 where f6 >= 'Lakshya3';
50 echo explain plan select * from t1 where f7 = '2003-11-12';
51 explain plan select * from t1 where f7 = '2003-11-12';
52 echo explain plan select * from t1 where f7 > '2003-11-12';
53 explain plan select * from t1 where f7 > '2003-11-12';
54 echo explain plan select * from t1 where f8 = '03:21:00';
55 explain plan select * from t1 where f8 = '03:21:00';
56 echo explain plan select * from t1 where f8 < '03:21:00';
57 explain plan select * from t1 where f8 < '03:21:00';