I was looking for sites to help explain the EXIST condition to someone, and found a
page that explains it from a SQL Server perspective. The page mentioned something that makes perfect sense, but I've never seen it documented in the Informix world:
The EXISTS operator returns TRUE if the subquery returns one or more rows.
I was wondering whether anyone knows if Informix acts the same way? From a query optimization standpoint, it seems like it should act this way, but I've never seen it stated. I'd like to think that the engine doesn't waste resources trying to find all rows in the subquery's result set when it simply needs to know that there is at least one row that satisfies the condition(s) of the subquery.
On reflection, though, I suppose the NOT EXIST
would require going through the full subquery to confirm that it has an empty result set.
------------------------------
Mark Collins
------------------------------
#Informix