This content has been marked as final. Show 2 replies
Rahul K wrote:It's not very clear what you're asking. It would help if you quoted particular parts from theat page, and menitioned roughly where on the page they appear.
Hi Folks ,
Was going through Tom's explanation for IN AND EXISTS .
DOUBTS :Why wouldn't an equi-join be needed? If a join is being done, I think it would have to be an equi-join. What kind of join would you use?
NOT IN and NOT EXISTS should apparently behave similar to IN AND EXISTS. I mean , in case of NOT IN - The
sub-query is transformed to a view with distinct values and a join . but an equi join wouldn't be
needed here .So how does it work ?
Also for NOT EXISTS ,suppose the inner table is big enough and indexed on the column .Since weWhether it's EXISTS or NOT EXISTS, you have to see whether a match exists or not. An index would be helpful either way.
arent matching any values, i suppose the index wont be used. so how does NOT EXISTS work ?
Say you're working for a movie rental business, and you have an index of which title are available. Your boss gives you a list of titles, and asks you to find which ones your business has. You don't know how your boss is going to use the results you produce: perhaps he's going to feature the ones you have in an advertisement, or perhaps he's going to buy the ones you don't have. For your job, you don't need to know how ypour boss is going to use the results; you're going to look at the index either way.
That would be simple in the absence of the inevitably NULL values.
NOT IN and NOT EXISTS should apparently behave similar to IN AND EXISTS
Think about what Jonathan Lewis wrote : *“NOT IN” is not the opposite of “IN”*