Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does IN perform a implicit distinct ?
The IN operator refers to a *SET*. According to relational calculus, a
set never has duplicates!
So the distinct in your first statement is, by design, fully redundant.
In the past (pre 9i), the optimizer definitely wasn't smart enough to
notice the distinct was redundant, so it performed two sorts.
One would wish people would do something to learn relational concepts!
-- Sybrand Bakker, Senior Oracle DBAReceived on Tue May 31 2005 - 06:05:27 CDT