Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Speeding up query that contains BETWEEN
On 10 May 2002, dsaracini_at_yahoo.com wrote:
>>
> Any help will be greatly appreciated!
Try /*+ index(a IDX_ADDR_COMPOSITE) */ as your hint
Oracle has decided that it will use the single index on street_name to find all the rows where "a.street_name = 'TENNESSEE ST'" and then scan the data blocks looking for "a.street_no between 2141 and 2241 ". The hint should get it to use the index for that comparison.
Your second query should still be a little longer because it is a between vs an equality.
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Fri May 10 2002 - 19:31:16 CDT
![]() |
![]() |