Re: Less selective index chosen unexpectedly
От | Peter Geoghegan |
---|---|
Тема | Re: Less selective index chosen unexpectedly |
Дата | |
Msg-id | CAH2-WznC9xbNJE3ghpZb1u-sRqBN=Y8AFktQbwEOrbsm70z6qw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Less selective index chosen unexpectedly (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Список | pgsql-bugs |
On Tue, May 18, 2021 at 2:50 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > I think the real winner would be a mechanism to incrementally analyze > tables, so that it updates the existing stats by sampling only blocks > that have new data, and "somehow" merge that into the existing > statistics. You could have such a process run much more frequently than > standard analyze, because the cost is [supposed to be] smaller. I wonder if there is a more general design that incorporates changes over time. That is, a design that has ANALYZE store old statistics for a table in order to give the system (and the DBA) a sense of how things change over time. This could enable autoanalyze behavior that more or less settles on an optimal frequency between ANALYZE operations -- frequent enough to get stable statistics with some margin of error, but not too frequent. I also wonder if this general approach could enable a strategy that uses something like Bayesian inference to detect bad statistics, and/or to dampen the consequences of bad estimates. -- Peter Geoghegan
В списке pgsql-bugs по дате отправления: