Re: strange row number estimates in pg9.1rc1
От | Sergey E. Koposov |
---|---|
Тема | Re: strange row number estimates in pg9.1rc1 |
Дата | |
Msg-id | alpine.LRH.2.00.1108302021220.21041@lnfm1.sai.msu.ru обсуждение исходный текст |
Ответ на | Re: strange row number estimates in pg9.1rc1 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: strange row number estimates in pg9.1rc1
|
Список | pgsql-hackers |
On Tue, 30 Aug 2011, Tom Lane wrote: > Sure enough, that's the problem. pg_upgrade leaves relpages/reltuples > set to zero, but it also imports the visibility map pages from the old > cluster. If the old visibility map shows the table as all-visible, > then this happens when you try to VACUUM ANALYZE the table: > > 1. VACUUM doesn't process any pages, so it has no tuple density > estimate. It leaves reltuples set to zero, but it does set relpages. > > 2. ANALYZE scans some part of the table. It gets a tuple density > estimate for those pages ... but if that's only a small fraction of > the table, it believes the zero estimate of tuple density elsewhere. > So you get only a small update of reltuples. Thanks for figuring this out. I wonder what should be the best way to proceed for already migrated databases -- running analyze repeatedly may not be the best way for very large clusters with large tables... S ******************************************************************* Sergey E. Koposov, PhD Institute for Astronomy, Cambridge/Sternberg Astronomical Institute Web: http://lnfm1.sai.msu.ru/~math E-mail: math@sai.msu.ru
В списке pgsql-hackers по дате отправления: