tables getting bloated

Started by akp geekabout 16 years ago6 messagesgeneral
Jump to latest
#1akp geek
akpgeek@gmail.com

Hi All -

I have been doing vacuum full on the database. Also I do
vacuum these 2 tables. But there are 2 tables they are getting bloated like
any thing. Just only 2 tables. Can you please suggest that I can do to
tackle the issue. Appreciate your help

Regards

#2Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: akp geek (#1)
Re: tables getting bloated

On Thu, 2010-03-18 at 09:35 -0400, akp geek wrote:

I have been doing vacuum full on the database. A

Why? VF does not help you to get rid of bloat -- actually it will create
more bloat.
--
Devrim GÜNDÜZ
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
PostgreSQL RPM Repository: http://yum.pgrpms.org
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz

#3akp geek
akpgeek@gmail.com
In reply to: Devrim GÜNDÜZ (#2)
Re: tables getting bloated

I have job that does the vacuum full every day for those 2 tables and also
for the database. By the end of the day, the get bloated.

Regards

2010/3/18 Devrim GÜNDÜZ <devrim@gunduz.org>

Show quoted text

On Thu, 2010-03-18 at 09:35 -0400, akp geek wrote:

I have been doing vacuum full on the database. A

Why? VF does not help you to get rid of bloat -- actually it will create
more bloat.
--
Devrim GÜNDÜZ
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
PostgreSQL RPM Repository: http://yum.pgrpms.org
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz

#4Vick Khera
vivek@khera.org
In reply to: akp geek (#3)
Re: tables getting bloated

2010/3/18 akp geek <akpgeek@gmail.com>:

I have job that does the vacuum full every day for those 2 tables and also
for the database. By the end of the day, the get bloated.

Do not run vacuum full. Run vacuum. For these two tables, run vacuum
more often, as you clearly are updating it very frequently. You may
want to investigate running autovacuum which will probably take care
of this for you.

For our big database, I run vacuum nightly on the whole thing, and let
autovacuum run as well, to take care of the high-churn tables. I run
the nightly just to keep the autovacuum from running during peak times
on my larger tables which don't churn as much, but are speed
sensitive.

#5Craig Ringer
craig@2ndquadrant.com
In reply to: akp geek (#3)
Re: tables getting bloated

On 18/03/2010 9:48 PM, akp geek wrote:

I have job that does the vacuum full every day for those 2 tables and
also for the database. By the end of the day, the get bloated.

http://wiki.postgresql.org/wiki/Introduction_to_VACUUM%2C_ANALYZE%2C_EXPLAIN%2C_and_COUNT

http://wiki.postgresql.org/wiki/VACUUM_FULL

--
Craig Ringer

#6akp geek
akpgeek@gmail.com
In reply to: Craig Ringer (#5)
Re: tables getting bloated

Thanks for the help

2010/3/18 Craig Ringer <craig@postnewspapers.com.au>

Show quoted text

On 18/03/2010 9:48 PM, akp geek wrote:

I have job that does the vacuum full every day for those 2 tables and
also for the database. By the end of the day, the get bloated.

http://wiki.postgresql.org/wiki/Introduction_to_VACUUM%2C_ANALYZE%2C_EXPLAIN%2C_and_COUNT

http://wiki.postgresql.org/wiki/VACUUM_FULL

--
Craig Ringer