Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7FD7B476502 for ; Thu, 12 Dec 2002 09:29:47 -0500 (EST) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 4DE354762C6 for ; Thu, 12 Dec 2002 09:29:46 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Thu Dec 12 15:29:46 2002 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA14194; Thu, 12 Dec 2002 15:29:45 +0100 (MET) Message-ID: <3DF89D59.DAD4BAC3@rodos.fzk.de> Date: Thu, 12 Dec 2002 15:29:45 +0100 From: Christoph Haller X-Mailer: Mozilla 4.06 [en] (X11; I; HP-UX B.10.20 9000/780) MIME-Version: 1.0 To: hhiturre@yahoo.com.ar Cc: pgsql-sql@postgresql.org Subject: Re: Performance Problems Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/157 X-Sequence-Number: 10745 > > I have performance problems with a huge database > (there a 2 tables with 40 millions of records) and > many users doing updates and queries on it. I 've > perform severals VACUMM on the database with poor > results. > Each table have an unique index and I added other > indexes to improve the performance. But when there are > inserts (not too many) the performance fall. > What can I do to improve the performace? I hear any > opinion. > Bear in mind, every index has to be updated when records are inserted. An unique one makes it even worse, because a search for duplicates must be performed. You may give the idea some thought, if this index really has to be unique. I sometimes use a 'timestamp-insert' column to allow duplicates and retrieve unique entries by a SELECT DISTINCT ON construct. Regards, Christoph