Zero dead tuples, when significant apparent bloat

Поиск
Список
Период
Сортировка
От John Melesky
Тема Zero dead tuples, when significant apparent bloat
Дата
Msg-id CAJ1GNCotqp=9qyCJAwz_20Q769x5jZ5C7AgR-qg8xhaBbyfQUA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Zero dead tuples, when significant apparent bloat
Re: Zero dead tuples, when significant apparent bloat
Список pgsql-general
Here's the situation:

 relation_size  | indexes_size   | total_relation_size 
----------------+----------------+---------------------
 997 MB         | 2073 MB        | 3070 MB
(1 row)

If I select n_dead_tup from pg_stat_user_tables, I get:

 n_dead_tup
------------
          0

Okay, so I run ANALYZE table, then check again:

 n_dead_tup
------------
          0

Finally, I run VACUUM FULL ANALYZE table. Now I see:

 relation_size  | indexes_size   | total_relation_size 
----------------+----------------+---------------------
 118 MB         | 200 MB         | 319 MB
(1 row)

.... ?

It seems clear that there were dead tuples, since the table size shrank to an eighth of its previous size. Why did analyze not pick that up?

Am I missing something?

This is a very large database, so we want to introspect against live/dead tuple percentage to minimize the tables we run a VACUUM FULL against.

I've been staring at this for days.

-john

--
John Melesky | Sr Database Administrator
503.284.7581 x204 | john.melesky@rentrak.com
RENTRAK | www.rentrak.com | NASDAQ: RENT

Notice: This message is confidential and is intended only for the
recipient(s) named above. If you have received this message in error,
or are not the named recipient(s), please immediately notify the
sender and delete this message.

В списке pgsql-general по дате отправления:

Предыдущее
От: Jerry Sievers
Дата:
Сообщение: Re: validate synatax
Следующее
От: bricklen
Дата:
Сообщение: Re: Zero dead tuples, when significant apparent bloat