Search Postgresql Archives

Re: checking for table bloat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx)

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux