Re: somewhat slow query with subselect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marcus Engene <mengpg2(at)engene(dot)se>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: somewhat slow query with subselect
Date: 2009-08-25 16:52:05
Message-ID: 22991.1251219125@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marcus Engene <mengpg2(at)engene(dot)se> writes:
> ... In a case with some 5000 rows belonging to owner 123, this select really
> takes a long time. Way longer than without the subselect and order by
> filelength. I agree that with the subselect it would take some extra
> juice, but in my mind it would do some hash in memory which wouldn't be
> too slow to lookup in.

8.4 can turn EXISTS subqueries into hash joins, but previous releases
won't...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message james bardin 2009-08-25 16:54:54 Re: warm standby and reciprocating failover
Previous Message Alvaro Herrera 2009-08-25 16:41:22 Re: R: Field's position in Table