Re: [HACKERS] Slow count(*) again... - Mailing list pgsql-performance

From Conor Walsh
Subject Re: [HACKERS] Slow count(*) again...
Date
Msg-id AANLkTikR77m7ttGb5Y1y7HWa0Os95TQXj_+wgqa9Xkfm@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Slow count(*) again...  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Does auto-analyze work on dirty writes? (was: Re: [HACKERS] Slow count(*) again...)  (Mark Mielke <mark@mark.mielke.cc>)
List pgsql-performance
On Thu, Feb 3, 2011 at 6:33 PM, Joshua D. Drake <jd@commandprompt.com> wrote:
> Well that already happens...

My understanding is that auto-analyze will fire only after my
transaction is completed, because it is a seperate daemon.  If I do
like so:

BEGIN;
COPY ...;
-- Dangerously un-analyzed
SELECT complicated-stuff ...;
END;

Auto-analyze does not benefit me, or might not because it won't fire
often enough.  I agree that analyze is very fast, and it often seems
to me like the cost/benefit ratio suggests making auto-analyze even
more aggressive.

Disclaimer/disclosure: I deal exclusively with very large data sets
these days, so analyzing all the time is almost a highly effective
worst-case amortization.  I understand that constant analyze is not so
great in, say, an OLTP setting.  But if the check is cheap, making
auto-analyze more integrated and less daemon-driven might be a net
win.  I'm not sure.

-Conor

pgsql-performance by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: [HACKERS] Slow count(*) again...
Next
From: Scott Marlowe
Date:
Subject: Re: [HACKERS] Slow count(*) again...