Re: ANALYZE sampling is too good - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: ANALYZE sampling is too good
Date
Msg-id 52A667B8.3000001@2ndquadrant.com
Whole thread Raw
In response to Re: ANALYZE sampling is too good  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 12/06/2013 09:52 AM, Peter Geoghegan wrote:
> Has anyone ever thought about opportunistic ANALYZE piggy-backing on
> other full-table scans? That doesn't really help Greg, because his
> complaint is mostly that a fresh ANALYZE is too expensive, but it
> could be an interesting, albeit risky approach.

It'd be particularly interesting, IMO, if autovacuum was able to do it
using the synchronized scans machinery, so the analyze still ran in a
separate proc and didn't impact the user's query. Have an autovac worker
or two waiting for new scans to start on tables they need to analyze,
and if one doesn't start within a reasonable time frame they start their
own scan.

We've seen enough issues with hint-bit setting causing unpredictable
query times for user queries that I wouldn't want to add another "might
write during a read-only query" behaviour.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: ANALYZE sampling is too good
Next
From: Craig Ringer
Date:
Subject: Re: ANALYZE sampling is too good