Re: Poor select count(*) performance

From: Mike Ivanov <mike(at)thelinguist(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Poor select count(*) performance
Date: 2009-02-24 07:21:16
Message-ID: d55c18a50902232321m3a175662ja4a6c55245e2ee83@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 23, 2009 at 6:54 PM, Sam Mason <sam(at)samason(dot)me(dot)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!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jordan Tomkinson 2009-02-24 07:40:23 Re: High cpu usage after many inserts
Previous Message Scott Marlowe 2009-02-24 07:06:48 Re: javascript and postgres