Re: inner join on range criteria: unable to use index?
Correct, no table scanning necessary
but if you also have
...
3 1
3 2
3 3
3 4
4 1
4 2
4 3
4 4
and many more bigger values
You will need to go further down to get 3 1 , 3 2 and then to 4 and so on.
2 issues here, if you are searching a huge percentage of the data from the index, this can actually be slower than doing a full table scan, due to random IO and sequential IO.
2nd issue, the composite index (A,B) here does not help much when you have a range search on the earlier column A. Maybe only help to reduce the data access that is not required when the B condition fail.
Subject
Views
Written By
Posted
10321
August 11, 2008 04:34PM
3667
August 11, 2008 05:56PM
3729
August 11, 2008 06:04PM
3547
August 12, 2008 01:38AM
3218
August 12, 2008 09:30AM
Re: inner join on range criteria: unable to use index?
3160
August 12, 2008 07:11PM
3693
August 12, 2008 12:52PM
3035
September 26, 2008 11:38PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.