Subject | RE: [firebird-support] Re: How to update this table? EXPERIMENTAL RESULTS - Email found in subject |
---|---|
Author | Leyne, Sean |
Post date | 2011-10-07T14:43:36Z |
Tomasz,
Your test has NOT proved that FB handles sub-selects in an efficient manner. If you were to use the IN() predicate (as many first time FB users do and some ER frameworks) instead of EXISTS() you would find that a very different story.
Sean
> Conclusion: using select 1 ... instead of select * ... in the sub-select doesn'tYour test has only proved that the EXISTS predicate yields consistent performance regardless of whether SELECT 1 or SELECT * is used.
> improve anything, while using select first(1) ... even slows things down a bit.
> IMHO, that proves FB handles the sub-selects in an efficient manner, i.e.
> doesn't retrieve irrelevant data and exits the sub-select as soon as the first
> record arrives.
Your test has NOT proved that FB handles sub-selects in an efficient manner. If you were to use the IN() predicate (as many first time FB users do and some ER frameworks) instead of EXISTS() you would find that a very different story.
Sean