Re: How can an index be larger than a table - Mailing list pgsql-performance

From Chris Browne
Subject Re: How can an index be larger than a table
Date
Msg-id 60br882f3d.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to How can an index be larger than a table  ("David Roussel" <pgsql-performance@diroussel.xsmail.com>)
List pgsql-performance
josh@agliodbs.com (Josh Berkus) writes:
> David,
>
>> What also seems weird to me is that the control table has some unique
>> indexes created on it, but the data_upate_events table just has a unique
>> constraint.  Will postgres use an index in the background to enforce
>> this constraint?
>
> If you somehow have a unique constraint without a unique index, something is
> seriously broken.   I suspect hacking of system tables.
>
> Otherwise, it sounds like you have index bloat due to mass deletions.  Run
> REINDEX, or, preferably, VACUUM FULL and then REINDEX.

There is in a sense no "best order" for this; VACUUM FULL will wind up
further injuring the indices when it reorganizes the table, which
means that whether you do it first or last, you'll have "index injury."

This actually seems a plausible case for CLUSTER.  (And as Douglas &
Douglas says, "You can become a hero by using CLUSTER."  :-))
--
(format nil "~S@~S" "cbbrowne" "acm.org")
http://www.ntlug.org/~cbbrowne/sap.html
Rules of the Evil Overlord #78.  "I will not tell my Legions of Terror
"And he must  be taken alive!" The command will be:  ``And try to take
him alive if it is reasonably practical.''"
<http://www.eviloverlord.com/>

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Index bloat problem?
Next
From: Chris Browne
Date:
Subject: Re: Index bloat problem?