Re: Vacuuming of indexes on tables.

From: elein <elein(at)varlena(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: elein <elein(at)varlena(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuuming of indexes on tables.
Date: 2006-04-18 19:13:24
Message-ID: 20060418191323.GT20430@varlena.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 18, 2006 at 09:50:04AM -0400, Tom Lane wrote:
> elein <elein(at)varlena(dot)com> writes:
> > Much later in the day, a vacuum analyze of the
> > db showed that all of the indexes for that table
> > required significant vacuuming, although the
> > table did not.
>
> What do you mean by that exactly? If it's just that the index pages
> emptied by one VACUUM aren't actually recycled till the next one,
> that's by design.
>
> regards, tom lane

Mine is a case where a table with constant inserts has a range
of data deleted once daily.

So you are saying that to truly vacuum a table and its indexes that
the table should be vacuumed twice or more.

The order of events seems to be vacuum indexes and then vacuum the
table. Wouldn't we get more bang if we vacuumed the table and then
the indexes? No doubt there is a reason for the ordering as it stands
but I am not familiar with it.

Perhaps it is not optimal to fully vacuum a table and its indexes?

--elein
elein(at)varlena(dot)com

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-04-18 19:21:10 Re: Weird error updating table
Previous Message Mark Lewis 2006-04-18 18:24:51 Re: [JDBC] [SQL] Thoughts on a Isolation/Security problem.