Re: small table occupies many relpages - Mailing list pgsql-admin

From Tom Lane
Subject Re: small table occupies many relpages
Date
Msg-id 29091.1068219946@sss.pgh.pa.us
Whole thread Raw
In response to small table occupies many relpages  (Markus Bertheau <twanger@bluetwanger.de>)
Responses Re: small table occupies many relpages
List pgsql-admin
Markus Bertheau <twanger@bluetwanger.de> writes:
> It has a unique index on virtual_domain. Every day we do <10000 queries
> of the form
> insert into virtual_domains values (default, 'www.something.de')

So you're expecting these inserts to fail because of unique index
violations?

> The big table size slows down sequential scans significantly. What can
> we do to prevent growth of the table?

Vacuum more often.  You have to get rid of the tuples that failed the
index check.  They are already in the table when the index spits up.

            regards, tom lane

pgsql-admin by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: I feel a bit dumb, but getting a bit clueless
Next
From: Tom Lane
Date:
Subject: Re: Out of buffer error