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