vacuuming and reindexing - Mailing list pgsql-admin

From Tena Sakai
Subject vacuuming and reindexing
Date
Msg-id FE44E0D7EAD2ED4BB2165071DB8E328C04E84A32@egcrc-ex01.egcrc.org
Whole thread Raw
Responses Re: vacuuming and reindexing  (Diogenes Caraballo <diogns@gmail.com>)
List pgsql-admin

Hi Everybody,

I have a table that I add rows every evening.
A rule I have for this table is that no row
ever gets deleted.  It has 600+ million rows.

The last time I did it, it took nearly 4 hours
to vacuum and 13 hours 40 minutes to reindex.

My rudimental understanding of vacuuming is
that when the rows get "deleted" it is only
marked as "deleted" but the data is left alone
until the act of vacuuming takes place.  The
vacuuming really gets rid of rows and pushes
the data in such the way there is no "hole."
And therefore after vacuuming, it is necessary
to reindex (and analyze) the table.

Is this a correct understanding?

If it is (and as new rows get added new indexes
are also built for the new rows), the fact that
there is no deletion means there is no necessity
for vacuuming this particular table?

I appreciate any thoughts on this matter.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu



pgsql-admin by date:

Previous
From: Caleb Cushing
Date:
Subject: Re: pg_dump formatting
Next
From: DM
Date:
Subject: pg_restore error - Any Idea?