1 echo create table t1
(f1 int
,f2 int
);
3 echo create table t2
(f1 int
,f2 int
);
5 echo create table t3
(f1 int
,f2 int
);
7 echo create index idx1 on t1
(f1
) tree
;
9 echo create index idx2 on t2
(f1
) tree
;
11 echo create index idx3 on t3
(f1
) tree
;
13 echo create index idx4 on t1
(f2
) hash;
15 echo create index idx5 on t2
(f2
) hash;
17 echo create index idx6 on t3
(f2
) hash;
19 echo insert into t1 values
(101,100);
20 Statement Executed
: Rows Affected
= 1
21 echo insert into t1 values
(303,333);
22 Statement Executed
: Rows Affected
= 1
23 echo insert into t1 values
(505,555);
24 Statement Executed
: Rows Affected
= 1
25 echo insert into t2 values
(505,100);
26 Statement Executed
: Rows Affected
= 1
27 echo insert into t2 values
(404,444);
28 Statement Executed
: Rows Affected
= 1
29 echo insert into t2 values
(101,110);
30 Statement Executed
: Rows Affected
= 1
31 echo insert into t3 values
(303,333);
32 Statement Executed
: Rows Affected
= 1
33 echo insert into t3 values
(101,110);
34 Statement Executed
: Rows Affected
= 1
35 echo insert into t3 values
(222,200);
36 Statement Executed
: Rows Affected
= 1
37 echo select * from t1
,t2
,t3 where t1.f1
= t2.f1 and t2.f1
=100;
38 ---------------------------------------------------------
39 t1.f1 t1.f2 t2.f1 t2.f2 t3.f1 t3.f2
40 ---------------------------------------------------------
41 100 100 100 110 303 333
42 100 100 100 110 101 110
43 100 100 100 110 100 200
45 echo select * from t2
,t1
,t3 where t1.f1
= t2.f1 and t2.f1
=100;
46 ---------------------------------------------------------
47 t2.f1 t2.f2 t1.f1 t1.f2 t3.f1 t3.f2
48 ---------------------------------------------------------
49 100 110 100 100 303 333
50 100 110 100 100 101 110
51 100 110 100 100 100 200
53 echo select * from t3
,t1
,t2 where t1.f1
= t2.f1 and t2.f1
=100;
54 ---------------------------------------------------------
55 t3.f1 t3.f2 t1.f1 t1.f2 t2.f1 t2.f2
56 ---------------------------------------------------------
57 303 333 100 100 100 110
58 101 110 100 100 100 110
59 100 200 100 100 100 110