X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 372F19DCB4B for ; Wed, 15 Mar 2006 15:39:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13828-09 for ; Wed, 15 Mar 2006 15:39:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.digitalfairway.ca (ns.digitalfairway.ca [207.164.133.170]) by postgresql.org (Postfix) with ESMTP id 52BB09DC9AC for ; Wed, 15 Mar 2006 15:39:15 -0400 (AST) Received: from toronto.toronto.digitalfairway.ca (unknown [192.168.100.10]) by mail.digitalfairway.ca (Postfix) with ESMTP id C3FA5A06BA for ; Wed, 15 Mar 2006 14:39:15 -0500 (EST) Received: from localhost (toronto.toronto.digitalfairway.ca [127.0.0.1]) by toronto.toronto.digitalfairway.ca (Postfix) with ESMTP id B2EE012985C for ; Wed, 15 Mar 2006 14:39:15 -0500 (EST) Received: from toronto.toronto.digitalfairway.ca ([127.0.0.1]) by localhost (toronto.toronto.digitalfairway.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11222-07 for ; Wed, 15 Mar 2006 14:39:15 -0500 (EST) Received: from [192.168.100.50] (unknown [192.168.100.50]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by toronto.toronto.digitalfairway.ca (Postfix) with ESMTP id 9B86612985B for ; Wed, 15 Mar 2006 14:39:15 -0500 (EST) From: Jan de Visser To: pgsql-performance@postgresql.org Subject: Slow SELECTS after large update cycle Date: Wed, 15 Mar 2006 14:39:13 -0500 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603151439.13958.jdevisser@digitalfairway.com> X-Virus-Scanned: amavisd-new at digitalfairway.ca X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.09 required=5 tests=[AWL=0.090] X-Spam-Score: 0.09 X-Spam-Level: X-Archive-Number: 200603/215 X-Sequence-Number: 17652 Hello, After fixing the hanging problems I reported here earlier (by uninstalling= =20 W2K3 SP1), I'm running into another weird one. After doing a +/- 8hr cycle of updates and inserts (what we call a 'batch')= ,=20 the first 'reporting' type query on tables involved in that write cycle is= =20 very slow. As an example, I have a query which according to EXPLAIN ANALYZE= =20 takes about 1.1s taking 46s. After this one hit, everything is back to=20 normal, and subsequent executions of the same query are in fact subsecond.= =20 Restarting the appserver and pgsql does not make the slowness re-appear, on= ly=20 running another batch will. During the 'write'/batch cycle, a large number of rows in various tables ar= e=20 inserted and subsequently (repeatedly) updated. The reporting type queries= =20 after that are basically searches on those tables. Anybody any ideas? Thanks, jan =2D-=20 =2D------------------------------------------------------------- Jan de Visser =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 jdevisser@digitalfair= way.com =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Baruk Khazad! Khazad ai-menu! =2D-------------------------------------------------------------