Re: how sub queries and joins differs funcationally - Mailing list pgsql-admin

From Ludwig Lim
Subject Re: how sub queries and joins differs funcationally
Date
Msg-id 20030127075236.66462.qmail@web80314.mail.yahoo.com
Whole thread Raw
In response to how sub queries and joins differs funcationally  ("shreedhar" <shreedhar@lucidindia.net>)
List pgsql-admin
Hi shreedhar :

--- shreedhar <shreedhar@lucidindia.net> wrote:
> Can any body tell that how sub queries and joins
> differs funcationally.
> Because sub queries taking lot of time than joins.
>
  The following could be the probable reasons:
  a) Your are using correlated queries - Correlated
queries always re-evaluate the sub-query for each row
processed.
b) You have an IN clause - try using EXISTS clause,
since it IN clause doesn't utilize the index when your
subquery is another SELECT statement.

ludwig.



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

pgsql-admin by date:

Previous
From: "shreedhar"
Date:
Subject: how sub queries and joins differs funcationally
Next
From: Michiel Lange
Date:
Subject: Re: Cannot connect to the database (PG 7.3)