Re: Simple queries take forever to run - Mailing list pgsql-performance

From Stephan Szabo
Subject Re: Simple queries take forever to run
Date
Msg-id 20030827182051.W85397-100000@megazone.bigpanda.com
Whole thread Raw
In response to Simple queries take forever to run  (Michael Guerin <guerin@rentec.com>)
Responses Re: Simple queries take forever to run  (Michael Guerin <guerin@rentec.com>)
List pgsql-performance
On Wed, 27 Aug 2003, Michael Guerin wrote:

> I'm running into some performance problems trying to execute simple
> queries.
>
> postgresql version 7.3.3
> .conf params changed from defaults.
> shared_buffers = 64000
> sort_mem = 64000
> fsync = false
> effective_cache_size = 400000
>
> ex. query: select * from x where id in (select id from y);
>
> There's an index on each table for id.  SQL Server takes <1s to return,
> postgresql doesn't return at all, neither does explain analyze.

IN(subquery) is known to run poorly in 7.3.x and earlier.  7.4 is
generally much better (for reasonably sized subqueries) but in earlier
versions you'll probably want to convert into an EXISTS or join form.


pgsql-performance by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Queries sometimes take 1000 times the normal time
Next
From: Neil Conway
Date:
Subject: Re: Simple queries take forever to run