Skip site navigation (1) Skip section navigation (2)

Re: pgsql: When estimating the selectivity of an inequality "column >

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgsql: When estimating the selectivity of an inequality "column >
Date: 2010-01-04 14:50:21
Message-ID: 20100104145021.GB3778@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-04 14:59:48
Subject: Re: quoting psql varible as identifier
Previous:From: Andrew DunstanDate: 2010-01-04 14:44:53
Subject: Re: invalid UTF-8 via pl/perl

pgsql-committers by date

Next:From: Greg StarkDate: 2010-01-04 15:50:03
Subject: Re: pgsql: When estimating the selectivity of an inequality "column >
Previous:From: Greg StarkDate: 2010-01-04 13:29:52
Subject: Re: pgsql: When estimating the selectivity of an inequality "column >

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group