salsubaiee | 3c59d76 | 2013-02-06 09:10:05 +0000 | [diff] [blame] | 1 | /* |
Ildar Absalyamov | c70c06a | 2014-11-11 16:37:04 -0800 | [diff] [blame^] | 2 | * Description : This test is intended to verify that the secondary BTree index is used |
salsubaiee | 3c59d76 | 2013-02-06 09:10:05 +0000 | [diff] [blame] | 3 | * : in the optimized query plan. |
| 4 | * Expected Result : Success |
| 5 | * Date : 13th Aug 2012 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | use dataverse test; |
| 11 | |
Ildar Absalyamov | c70c06a | 2014-11-11 16:37:04 -0800 | [diff] [blame^] | 12 | write output to nc1:"rttest/btree-index_btree-secondary-59.adm"; |
salsubaiee | 3c59d76 | 2013-02-06 09:10:05 +0000 | [diff] [blame] | 13 | |
| 14 | create type TestType as open { |
| 15 | id : int32, |
| 16 | fname : string, |
| 17 | lname : string |
| 18 | } |
| 19 | |
Ildar Absalyamov | c70c06a | 2014-11-11 16:37:04 -0800 | [diff] [blame^] | 20 | create dataset testdst(TestType) primary key id; |
salsubaiee | 3c59d76 | 2013-02-06 09:10:05 +0000 | [diff] [blame] | 21 | |
Ildar Absalyamov | c70c06a | 2014-11-11 16:37:04 -0800 | [diff] [blame^] | 22 | create index sec_Idx on testdst(fname); |
salsubaiee | 3c59d76 | 2013-02-06 09:10:05 +0000 | [diff] [blame] | 23 | |
| 24 | for $emp in dataset('testdst') |
Ildar Absalyamov | c70c06a | 2014-11-11 16:37:04 -0800 | [diff] [blame^] | 25 | where $emp.fname >= "Max" and $emp.fname <= "Roger" |
salsubaiee | 3c59d76 | 2013-02-06 09:10:05 +0000 | [diff] [blame] | 26 | return $emp |