Re: Poor select count(*) performance - Mailing list pgsql-general

From Mike Ivanov
Subject Re: Poor select count(*) performance
Date
Msg-id d55c18a50902232321m3a175662ja4a6c55245e2ee83@mail.gmail.com
Whole thread Raw
In response to Re: Poor select count(*) performance  (Sam Mason <sam@samason.me.uk>)
Responses Re: Poor select count(*) performance
List pgsql-general
On Mon, Feb 23, 2009 at 6:54 PM, Sam Mason <sam@samason.me.uk> wrote:

Depending on where these are on disk and how fast your disks are this
could take up to 30 seconds.

This does not sound very inspiring :-)

Would throwing more hardware (memory, faster CPU) at the server improve the situation?
 
If you want this sort of thing to go quicker you could try CLUSTERing

This can help because all other queries to this table alway filtered/grouped by context_id field. I will try that.
 
Thanks a lot, Sam!

pgsql-general by date:

Previous
From: Jordan Tomkinson
Date:
Subject: Re: High cpu usage after many inserts
Next
From: Scott Marlowe
Date:
Subject: Re: High cpu usage after many inserts