Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> INTERSECT QUESTION
I have a view called V_EMPLOYEES, which is a join of 3 tables. If I do this Select against the view:
SELECT EMP_ID FROM V_EMPLOYEES WHERE CITY = 'RESTON' the response is quick. If I do
SELECT EMP_ID FROM V_EMPLOYEES WHERE STATE = 'VA' the response is equally quick. If I do
SELECT EMP_ID FROM V_EMPLOYEES WHERE CITY = 'RESTON' AND STATE = 'VA' the response is painfully slow. But if I do an Intersect like the following
SELECT EMP_ID FROM V_EMPLOYEES WHERE CITY = 'RESTON'
INTERSECT
SELECT EMP_ID FROM V_EMPLOYEES WHERE STATE = 'VA'
the response is also quick.
Is there an explanation from such behavior?
Thanks,
Lito
Lito Dizon
adizon_at_us.net
Received on Thu Dec 26 1996 - 00:00:00 CST
![]() |
![]() |