Re: pgsql: When estimating the selectivity of an inequality "column > - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pgsql: When estimating the selectivity of an inequality "column >
Date
Msg-id 20100104145021.GB3778@alvh.no-ip.org
Whole thread Raw
In response to Re: pgsql: When estimating the selectivity of an inequality "column >  (Greg Stark <gsstark@mit.edu>)
Responses Re: pgsql: When estimating the selectivity of an inequality "column >  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark wrote:

> I also wonder if we want to run these lookups on every single planner
> invocation. If the table is being rarely updated analyze will never
> fire and the stats value will never be updated. I don't think we want
> the planner doing write operations to the stats either though. It
> would be nice if there was a low-cost mode of operation for ANALYZE
> which simulates precisely this update, the planner could send a stats
> message saying that autovacuum should schedule one of these operations
> sometime even if it doesn't see a need for a full analyze run.

Maybe autovac could run such a cheap ANALYZE frequently on tables with
large number of inserts (but not large enough to trigger a regular
ANALYZE) ... say a fixed number of tuples (not depending on pg_class.reltuples)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: invalid UTF-8 via pl/perl
Next
From: Tom Lane
Date:
Subject: Re: quoting psql varible as identifier