Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 729119FA3B1 for ; Wed, 13 Dec 2006 13:14:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 54253-09 for ; Wed, 13 Dec 2006 13:14:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 9D3A09FA162 for ; Wed, 13 Dec 2006 13:14:11 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so226849ugf for ; Wed, 13 Dec 2006 09:14:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cUueBGkj5gqK1IVEpQvADE021yqex3l0/w8Vo5zQ1km2KMiFjBxdaSAv2SBZbqeVK85p3dSz5uhXVpH24GIvwTbFGfY1WLMCg1CfoWxCRVKoe0TuMxQjBAwXvk4BsTAHBPTV0Mixkaeq2cF1/nlowKBTJ7npkX4EIoIoL6uBdkk= Received: by 10.67.19.20 with SMTP id w20mr1501624ugi.1166030050528; Wed, 13 Dec 2006 09:14:10 -0800 (PST) Received: by 10.66.216.15 with HTTP; Wed, 13 Dec 2006 09:14:10 -0800 (PST) Message-ID: Date: Wed, 13 Dec 2006 22:44:10 +0530 From: "Rajesh Kumar Mallah" To: "Steven Flatt" Subject: Re: Insertion to temp table deteriorating over time Cc: pgsql-performance@postgresql.org In-Reply-To: <357fa7590612130844q58ef3ca5q31e164f9b006e0fc@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <357fa7590612130844q58ef3ca5q31e164f9b006e0fc@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/327 X-Sequence-Number: 22383 On 12/13/06, Steven Flatt wrote: > Hi, > > Our application is using Postgres 7.4 and I'd like to understand the root > cause of this problem: > > To speed up overall insert time, our application will write thousands of > rows, one by one, into a temp table 1. how frequently are you commiting the transaction ? if you commit less frequetly it will be faster. 2. If you use COPY instead of INSERT it will be faster. using COPY is easy with DBD::Pg (perl). In versions 8.x i think there has been major speed improvements in COPY. I do not know the root cause of slowdown though. Regds mallah. >