X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5B8DFD1B433 for ; Fri, 5 Dec 2003 21:52:23 +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 37296-04 for ; Fri, 5 Dec 2003 17:51:54 -0400 (AST) Received: from noao.edu (noao.edu [140.252.1.54]) by svr1.postgresql.org (Postfix) with ESMTP id 1F52ED1B43A for ; Fri, 5 Dec 2003 17:51:52 -0400 (AST) Received: from weaver.tuc.noao.edu ([140.252.38.8] verified) by noao.edu (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 9794474; Fri, 05 Dec 2003 14:51:48 -0700 Received: from weaver.tuc.noao.edu (localhost.localdomain [127.0.0.1]) by weaver.tuc.noao.edu (8.12.8/8.12.5) with ESMTP id hB5Lpm7Q018261; Fri, 5 Dec 2003 14:51:48 -0700 Received: (from swampler@localhost) by weaver.tuc.noao.edu (8.12.8/8.12.8/Submit) id hB5LpmxV018259; Fri, 5 Dec 2003 14:51:48 -0700 X-Authentication-Warning: weaver.tuc.noao.edu: swampler set sender to swampler@noao.edu using -f Subject: Help tracking down problem with inserts slowing down... From: Steve Wampler Reply-To: swampler@noao.edu To: Postgres-performance Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: National Solar Observatory Message-Id: <1070661108.20063.86.camel@weaver.tuc.noao.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 05 Dec 2003 14:51:48 -0700 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/135 X-Sequence-Number: 4995 I need some help tracking down a sudden, massive slowdown in inserts in one of our databases. PG: 7.2.3 (RedHat 8.0) Background. We currently run nearly identical systems at two sites: Site A is a 'lab' site used for development, Site B is a production site. The databases in question have identical structure: A simple table with 4 columns with a trigger function on inserts (which checks to see if the entry already exists, and if so, changes the insert into an update...) A simple view with 4 columns into the above table. All access is through jdbc (JDK 1.3.1, jdbc 7.1-1.3), postgresql.conf's are identical. The two sites were performing at comparable speeds until a few days ago, when we deleted several million records from each database and then did a vacuum full; analyze on both. Now inserts at Site B are several orders of magnitude slower than at Site A. The odd thing is that Site B's DB now has only 60,000 records while Site A's is up around 3 million. Inserts at A average 63ms, inserts at B are now up at 4.5 seconds! EXPLAIN doesn't show any difference between the two. Can someone suggest ways to track this down? I don't know much about postgresql internals/configuration. Thanks! Steve -- Steve Wampler -- swampler@noao.edu The gods that smiled on your birth are now laughing out loud.