Re: Less selective index chosen unexpectedly
От | Alvaro Herrera |
---|---|
Тема | Re: Less selective index chosen unexpectedly |
Дата | |
Msg-id | 20210518215048.GA22962@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: Less selective index chosen unexpectedly (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Less selective index chosen unexpectedly
|
Список | pgsql-bugs |
On 2021-May-18, Tom Lane wrote: > The only thing I see that's really going wrong here is marginally > inaccurate stats, especially right after a big insertion that's > not reflected into the stats yet. I'm not sure there's much to > improve there. You could increase the stats target some more, > though of course that just pushes out the size of table where > the issue will appear. 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. Of course, the big problem with this idea is how would you merge/update the stats at all in the first place. ... ah, it appears there have been attempts at this already: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.63.5414&rep=rep1&type=pdf -- Álvaro Herrera Valdivia, Chile "Ed is the standard text editor." http://groups.google.com/group/alt.religion.emacs/msg/8d94ddab6a9b0ad3
В списке pgsql-bugs по дате отправления: