Re: checking for table bloat
| От | Ondrej Ivanič |
|---|---|
| Тема | Re: checking for table bloat |
| Дата | |
| Msg-id | CAM6mieLXDPrWvChvRuunDPGB4+QZdOeE=K3n3TX=iMw8qNai=Q@mail.gmail.com обсуждение исходный текст |
| Ответ на | checking for table bloat (Ben Chobot <bench@silentmedia.com>) |
| Список | pgsql-general |
Hi > As I'm sure many people know, check_postgres.pl has a wonderful (if rather > arcane) query to check table bloat, which has been copied all over the > intarwebz. When I try to use this query one one of my databases I'm told my > table (which has had no deletes) is wasting a whole lot of bytes, but no > amount of vacuuming or even clustering will make it less bloated. You can use CTAS and re-create that table. The main issue with "check bloat" query is that you can't relay on absolute numbers. You should look the difference over the time (ie. run it once a day) and compare that number to database activity (pg_stat_all_tables - n_tup_* columns)) -- Ondrej Ivanic (ondrej.ivanic@gmail.com)
В списке pgsql-general по дате отправления: