1 echo No Primary key
-Test Case
- 1,2,3
5 <ScanType
> TableScan
</ScanType
>
7 echo select * from t1 where f1
=10;
10 <ScanType
> TableScan
</ScanType
>
12 <FieldName1
> f1
</FieldName1
>
13 <CompOp
> Equals
</CompOp
>
14 <OperandPtr
> VALUE
</OperandPtr
>
17 echo select * from t1 where f1
>10;
20 <ScanType
> TableScan
</ScanType
>
22 <FieldName1
> f1
</FieldName1
>
23 <CompOp
> GreaterThan
</CompOp
>
24 <OperandPtr
> VALUE
</OperandPtr
>
28 echo Primary key
-Test Case
- 4,5,6
29 echo select * from t1
;
32 <ScanType
> TableScan
</ScanType
>
34 echo select * from t1 where f1
=10;
37 <ScanType
> HashScan
</ScanType
>
39 <FieldName1
> f1
</FieldName1
>
40 <CompOp
> Equals
</CompOp
>
41 <OperandPtr
> VALUE
</OperandPtr
>
44 echo select * from t1 where f1
>10;
47 <ScanType
> TableScan
</ScanType
>
49 <FieldName1
> f1
</FieldName1
>
50 <CompOp
> GreaterThan
</CompOp
>
51 <OperandPtr
> VALUE
</OperandPtr
>
55 echo Hash Index
-Test Case
- 7,8,9
56 echo select * from t1
;
59 <ScanType
> TableScan
</ScanType
>
61 echo select * from t1 where f2
=10;
64 <ScanType
> HashScan
</ScanType
>
66 <FieldName1
> f2
</FieldName1
>
67 <CompOp
> Equals
</CompOp
>
68 <OperandPtr
> VALUE
</OperandPtr
>
71 echo select * from t1 where f2
>10;
74 <ScanType
> TableScan
</ScanType
>
76 <FieldName1
> f2
</FieldName1
>
77 <CompOp
> GreaterThan
</CompOp
>
78 <OperandPtr
> VALUE
</OperandPtr
>
82 echo Tree Index
-Test Case
- 10,11,12
83 echo select * from t1
;
86 <ScanType
> TableScan
</ScanType
>
88 echo select * from t1 where f3
=10;
91 <ScanType
> TreeScan
</ScanType
>
93 <FieldName1
> f3
</FieldName1
>
94 <CompOp
> Equals
</CompOp
>
95 <OperandPtr
> VALUE
</OperandPtr
>
98 echo select * from t1 where f2
>10;
101 <ScanType
> TreeScan
</ScanType
>
103 <FieldName1
> f3
</FieldName1
>
104 <CompOp
> GreaterThan
</CompOp
>
105 <OperandPtr
> VALUE
</OperandPtr
>