On 19 Dec 2002, Prachi Jain wrote:
> Hello All,
>
> I am using too many subqueries in my queries. I have read some
> FAQs that using EXISTS is faster than IN. Is that correct??
In general, with any RDBMS, the EXISTS construct is faster because the
subselect need only the first row to satisfy the condition whereas IN must
return all rows from the subselect. (Of course, the query optimizer must
take advantage of that fact ...)
(I am rather new to PostgrSQL but an old hand - in more ways than one <G>-
with commercial Ingres.)
Lucky Leavell