From: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com> |
---|---|
To: | shreedhar <shreedhar(at)lucidindia(dot)net> |
Cc: | PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: [ADMIN] how sub queries and joins differs funcationally |
Date: | 2003-01-27 07:36:17 |
Message-ID: | 20030127073617.1057.qmail@web80301.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
Hi shreedhar :
--- shreedhar <shreedhar(at)lucidindia(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Ludwig Lim | 2003-01-27 07:52:36 | Re: how sub queries and joins differs funcationally |
Previous Message | shreedhar | 2003-01-27 06:59:34 | how sub queries and joins differs funcationally |
From | Date | Subject | |
---|---|---|---|
Next Message | Ludwig Lim | 2003-01-27 07:52:36 | Re: how sub queries and joins differs funcationally |
Previous Message | shreedhar | 2003-01-27 06:59:34 | how sub queries and joins differs funcationally |