Discussion:
When is selection pushdown not optimal?
(too old to reply)
chris
2011-04-06 01:45:52 UTC
Permalink
I seem to recall a situation mentioned in class where pushing selections
down results in a non optimal plan. Unfortunately I don't seem to have
written that in my notes...
Can somebody tell me what that is? (or am i remembering wrong?)

Thanks,
Chris
chris
2011-04-07 20:18:10 UTC
Permalink
Nevermind. I found the answer among my notes:

If the selection operation is extremely expensive (e.g. containing a
user defined function that must be evaluated for every tuple), and the
join is very selective, it will be cheaper to perform the selection on
the result of the join (which will be smaller than the original relations).
Post by chris
I seem to recall a situation mentioned in class where pushing selections
down results in a non optimal plan. Unfortunately I don't seem to have
written that in my notes...
Can somebody tell me what that is? (or am i remembering wrong?)
Thanks,
Chris
Ken Salem
2011-04-07 20:46:20 UTC
Permalink
I could not have said it better myself. ;->
-KMS
Post by chris
If the selection operation is extremely expensive (e.g. containing a
user defined function that must be evaluated for every tuple), and the
join is very selective, it will be cheaper to perform the selection on
the result of the join (which will be smaller than the original relations).
Post by chris
I seem to recall a situation mentioned in class where pushing selections
down results in a non optimal plan. Unfortunately I don't seem to have
written that in my notes...
Can somebody tell me what that is? (or am i remembering wrong?)
Thanks,
Chris
Loading...