Re: inner join on range criteria: unable to use index?
Lets say you have 1000 rows, with value 0 to 999, and you have an index.
If you want to find all rows with value > 1, is it better to use the index or just read all the row?
The above is for 1 range condition.
If you have 2 range conditions, then it becomes more complicated. Usually only 1 range condition might be able to take advantage of the index, the other one not so useful anymore.
Lets take another example, you have a printed phone book that is sorted by the lastname follow by firstname. How do you find all people with lastname > 'b' and firstname <'d'. Is it easy or difficult?
Compare this with finding all people with lastname < 'b'.
And compare with finding all people with lastname < 'b' and firstname < 'b', would this any easier compare to the lastname < 'b' only?
Subject
Views
Written By
Posted
10317
August 11, 2008 04:34PM
3667
August 11, 2008 05:56PM
3729
August 11, 2008 06:04PM
Re: inner join on range criteria: unable to use index?
3546
August 12, 2008 01:38AM
3218
August 12, 2008 09:30AM
3160
August 12, 2008 07:11PM
3692
August 12, 2008 12:52PM
3033
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.