Skip site navigation (1) Skip section navigation (2)

Re: !!URGENT!! Should I keep INDEX on the table?

From: Oliver Fromme <olli(at)lurza(dot)secnetix(dot)de>
To: rbhide(at)nulinkinc(dot)com (Rajan Bhide)
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: !!URGENT!! Should I keep INDEX on the table?
Date: 2004-05-17 08:09:32
Message-ID: 200405170809.i4H89Wfe048921@lurza.secnetix.de (view raw or flat)
Thread:
Lists: pgsql-novice
Rajan Bhide wrote:
 > Even I was thinking, VACCUM ANALYSE <table-name> is jes enough but
 > following discussion on forum forced me to add reindexing as I also
 > saw similar error msgs from my postgres server.
 > 
 > > > Correct.  Someday, someone will step up to the plate and fix the problem 
 > > > with btrees growing and growing and not reusing dead space.
 > > > Til then the solution is to reindex heavily updated indexes during nightly 
 > > > maintenance.

I can't believe that's true.  That would be a serious show-
stopper bug in PostgreSQL, in my opinion.  The documentation
does not mention anywhere that periodically dropping and re-
creating indices might be necessary.  In fact, in chapter
11.8 it specifically says "indexes in PostgreSQL do not need
maintenance and tuning".

(Can anyone of the developers confirm or deny that?)

 > http://archives.postgresql.org/pgsql-general/2002-06/msg00813.php

That article is two years old, and describes different symp-
toms than what you described.  So I think it does not apply
to your case.

 > Also Can Some one help me understand the overhead involved
 > in DROPing and CREATing the indexes? How often this
 > activity should be performed?

I seriously hope it should not have be performed at all.
If you run a database cluster with dozens or even hundreds
of customers on it, it appears pretty ridculous to me to
have to rebuild all of their indices every night.  I don't
even want to know what indices they have -- it's the job
of the database to maintain that and care for it.

Frankly, I think VACUUMimg the databases (possibly with the
"FULL" option) should be enough for normal maintenance.
If it's not, I would consider that a bug, or at least a
serious PITA that deservers to be removed ASAP.  ;-)

(Just my 0.02 Euro.)

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 M√ľnchen
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"That's what I love about GUIs: They make simple tasks easier,
and complex tasks impossible."
        -- John William Chambless

In response to

Responses

pgsql-novice by date

Next:From: Philippe VERSCHOOTENDate: 2004-05-17 11:01:24
Subject: INSTALLING POSTGRESQL 7.4.2
Previous:From: Noel FauxDate: 2004-05-17 07:33:22
Subject: Re: pg_dump problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group