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 099C9D1B456 for ; Fri, 5 Dec 2003 01:45:44 +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 63663-05 for ; Thu, 4 Dec 2003 21:45:16 -0400 (AST) Received: from uhh.alcaron.ee (uhh.alcaron.ee [194.204.62.169]) by svr1.postgresql.org (Postfix) with ESMTP id 2FF3FD1B446 for ; Thu, 4 Dec 2003 21:45:11 -0400 (AST) Received: from iff by uhh.alcaron.ee with local id 1AS51u-0005YQ-00; Fri, 05 Dec 2003 03:45:14 +0200 Date: Fri, 5 Dec 2003 03:45:14 +0200 To: pgsql-performance@postgresql.org Subject: Re: Slow UPADTE, compared to INSERT Message-ID: <20031205014514.GA21079@alcaron.ee> References: <20031204185751.GA15893@alcaron.ee> <200312042023.37050.dev@archonet.com> <20031204221312.GA18874@alcaron.ee> <200312042245.21899.dev@archonet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200312042245.21899.dev@archonet.com> User-Agent: Mutt/1.3.28i From: Ivar Zarans X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/113 X-Sequence-Number: 4973 On Thu, Dec 04, 2003 at 10:45:21PM +0000, Richard Huxton wrote: > If you've got the time, try putting together a small test-script with some > dummy data and see if it's reproducible. I'm sure the other Python users > would be interested in seeing where the problem is. Tried with test-script, but this functioned normally (Murphy's law!). Then tweaked postrgesql.conf and switched on debugging options. Results show (in my opinion) that Python has nothing to do with slow UPDATE. Timing from postgresql itself shows duration of 0.29 sec. === postgres[21247]: [2707] DEBUG: StartTransactionCommand postgres[21247]: [2708-1] LOG: query: postgres[21247]: [2708-2] UPDATE postgres[21247]: [2708-3] imp_cdr_200311 postgres[21247]: [2708-4] SET postgres[21247]: [2708-5] Status = 'SKIP' postgres[21247]: [2708-6] WHERE postgres[21247]: [2708-7] ImpRecID = '202425' ... Skipped rewritten parse tree ... postgres[21247]: [2710-1] LOG: plan: postgres[21247]: [2710-2] { INDEXSCAN postgres[21247]: [2710-3] :startup_cost 0.00 postgres[21247]: [2710-4] :total_cost 6.01 postgres[21247]: [2710-5] :rows 1 postgres[21247]: [2710-6] :width 199 postgres[21247]: [2710-7] :qptargetlist ( ... Skipped target list ... postgres[21247]: [2711] DEBUG: CommitTransactionCommand postgres[21247]: [2712] LOG: duration: 0.292529 sec === Any suggestions for further investigation? -- Ivar Zarans