Re: Thoughts on statistics for continuously advancing columns

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Thoughts on statistics for continuously advancing columns
Дата
Msg-id 20091230171304.GG3662@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Thoughts on statistics for continuously advancing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Thoughts on statistics for continuously advancing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: KNNGiST for knn-search (WIP)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: KNNGiST for knn-search (WIP)