Subject | Re: [firebird-support] About EXISTS predicate |
---|---|
Author | Helen Borrie |
Post date | 2009-09-16T11:46:47Z |
>> Just one simple doubt, Is there any limitation for EXISTS predicate too, asAt 09:22 PM 16/09/2009, Thomas Steinmaurer wrote:
>> we have for IN predicate for 1500 values ?
>
>No, because EXISTS is a different construct than IN, which does notThere is more to it, as well. ;-)
>expect a list of input values.
The 1499 limit applies to an IN() predicate of the form
IN (const1, const2, ....)
The limit doesn't apply when the argument is a subquery.
Note, too:
The engine actually resolves the subquery form to EXISTS(), because it is logically equivalent and is a far more economical search than IN(). However, this does *NOT* apply to a NOT IN() predicate. While NOT IN(sq) AND NOT EXISTS() are equivalent in many situations, there are some situations where they return different results. (I can't think of an example; I just know that it is proven somewhere that this can be so.)
./heLen