salsubaiee | bb16791 | 2013-12-21 12:55:52 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Description : The hint to skip secondary indexes don't apply to the primary index |
| 3 | * : This test is intended to verify that the primary index is still used instead of a scan |
| 4 | * Expected Result : Success |
| 5 | * Date : 21th December 2013 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse test if exists; |
| 9 | create dataverse test; |
| 10 | use dataverse test; |
| 11 | |
| 12 | write output to nc1:"rttest/btree-index_btree-primary-16.adm"; |
| 13 | |
| 14 | create type TestType as open { |
| 15 | fname : string, |
| 16 | lname : string |
| 17 | } |
| 18 | |
| 19 | create dataset testdst(TestType) primary key fname,lname; |
| 20 | |
| 21 | for $emp in dataset('testdst') |
salsubaiee | df89fbc | 2013-12-21 19:51:42 -0800 | [diff] [blame] | 22 | where $emp.fname /*+ skip-index */ >= "Craig" and $emp.lname /*+ skip-index */ >= "Kevin" and $emp.fname /*+ skip-index */ <= "Mary" and $emp.lname /*+ skip-index */ <= "Tomes" |
salsubaiee | bb16791 | 2013-12-21 12:55:52 -0800 | [diff] [blame] | 23 | return $emp |