Re: Possible TODO item? VACUUM on empty table
От | Greg Stark |
---|---|
Тема | Re: Possible TODO item? VACUUM on empty table |
Дата | |
Msg-id | 87k6s8x4q5.fsf@stark.xeocode.com обсуждение исходный текст |
Ответ на | Possible TODO item? VACUUM on empty table (Richard Huxton <dev@archonet.com>) |
Ответы |
Re: Possible TODO item? VACUUM on empty table
|
Список | pgsql-hackers |
Richard Huxton <dev@archonet.com> writes: > So - would it be worth, in the case of vacuum+analyse (but not analyse alone), > where the table is completely empty then just halve the existing stats. > > That way, if you're in the middle of a delete/replace cycle your stats will > still be in the realms of reasonableness. On the other hand, if the table is > genuinely empty and you're running a nightly vacuum the stats will tend toward > 0. > > Against the idea: > 1. It's a special-case in the code Hm. I suppose the generalization of this would be to always average the new stats with the existing stats. I suppose you could make the argument that if I run analyze and then run analyze again without changing anything then I've effectively doubled the sample size and the stats can take advantage of that. But not all of the stats are simple totals. I'm not sure this would make sense for the histogram arrays. -- greg
В списке pgsql-hackers по дате отправления: