X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A0673D1B509 for ; Fri, 7 Nov 2003 15:46:18 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33220-09 for ; Fri, 7 Nov 2003 11:45:50 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 2F446D1B50D for ; Fri, 7 Nov 2003 11:45:46 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hA7Fjk19029092; Fri, 7 Nov 2003 10:45:46 -0500 (EST) To: Markus Bertheau Cc: pgsql-admin@postgresql.org, bertheau@bab24.de Subject: Re: small table occupies many relpages In-reply-to: <1068200182.2191.15.camel@silizium.cenes-intern.de> References: <1068200182.2191.15.camel@silizium.cenes-intern.de> Comments: In-reply-to Markus Bertheau message dated "07 Nov 2003 11:16:22 +0100" Date: Fri, 07 Nov 2003 10:45:46 -0500 Message-ID: <29091.1068219946@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/121 X-Sequence-Number: 11109 Markus Bertheau 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