X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CFD6C14B281C for ; Tue, 10 Aug 2004 15:18:12 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00633-09 for ; Tue, 10 Aug 2004 18:18:10 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id C700B14B2821 for ; Tue, 10 Aug 2004 15:18:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i7AII64P000182; Tue, 10 Aug 2004 14:18:06 -0400 (EDT) To: Paul Langard Cc: pgsql-performance@postgresql.org Subject: Re: Slow select, insert, update In-reply-to: References: Comments: In-reply-to Paul Langard message dated "Mon, 09 Aug 2004 17:54:00 +0100" Date: Tue, 10 Aug 2004 14:18:05 -0400 Message-ID: <181.1092161885@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/132 X-Sequence-Number: 7768 Paul Langard writes: > select count(id) from project > count > 9106 > 1 row(s) > Total runtime: 45,778.813 ms Yipes. The only explanation I can think of is tremendous table bloat. What do you get from "vacuum verbose project" --- in particular, how many pages in the table? > ... the database is regularly vaccuumed. Not regularly enough, perhaps ... or else you need to increase the free space map size parameters. In any case you'll probably need to do one round of "vacuum full" to get this table back within bounds. regards, tom lane