Re: Thoughts on statistics for continuously advancing columns - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Thoughts on statistics for continuously advancing columns
Date
Msg-id 20091230171304.GG3662@alvh.no-ip.org
Whole thread Raw
In response to Re: Thoughts on statistics for continuously advancing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Thoughts on statistics for continuously advancing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane escribió:
> Greg Smith <greg@2ndquadrant.com> writes:
> > Right, and the only thing that makes this case less painful is that you 
> > don't really need the stats to be updated quite as often in situations 
> > with that much data.  If, say, your stats say there's 2B rows in the 
> > table but there's actually 2.5B, that's a big error, but unlikely to 
> > change the types of plans you get.  Once there's millions of distinct 
> > values it's takes a big change for plans to shift, etc.
> 
> Normally, yeah.  I think Josh's problem is that he's got
> performance-critical queries that are touching the "moving edge" of the
> data set, and so the part of the stats that are relevant to them is
> changing fast, even though in an overall sense the table contents might
> not be changing much.

Maybe only tangentially related: if this was a setup partitioned by a
timestamp, it would be very useful to be able to analyze only the
current partition and have updated stats for the parent relation as
well.  However AFAICT with your proposed changes in this area this would
not work, right?  You'd need an analyze on the parent relation, which is
painful.

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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: KNNGiST for knn-search (WIP)
Next
From: Robert Haas
Date:
Subject: Re: KNNGiST for knn-search (WIP)