Re: [HACKERS] Slow count(*) again...

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] Slow count(*) again...
Date: 2011-02-04 01:28:08
Message-ID: 4D4B5628.8030100@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On 04/02/11 13:49, Jeremy Harris wrote:
> On 2011-02-03 21:51, Mark Kirkwood wrote:
>> The cases I've seen in production typically involve "outgrowing"
>> optimizer parameter settings: (e.g work_mem, effective_cache_size) as
>> the application dataset gets bigger over time.
>
> An argument in favour of the DBMS maintaining a running estimate of
> such things.

That is an interesting idea - I'm not quite sure how it could apply to
server config settings (e.g work_mem) for which it would be dangerous to
allow the server to increase on the fly, but it sure would be handy to
have some sort of query execution "memory" so that alerts like:

"STATEMENT: SELECT blah : PARAMETERS blah: using temp file(s), last
execution used memory"

could be generated (this could be quite complex I guess, requiring some
sort of long lived statement plan cache).

Cheers

Mark

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-04 01:29:14 Re: [HACKERS] Slow count(*) again...
Previous Message Grant Johnson 2011-02-04 01:18:28 Re: [HACKERS] Slow count(*) again...

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2011-02-04 01:29:14 Re: [HACKERS] Slow count(*) again...
Previous Message Grant Johnson 2011-02-04 01:18:28 Re: [HACKERS] Slow count(*) again...