Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0C13D2FC10D for ; Thu, 29 Mar 2012 16:40:12 -0300 (ADT) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SDLCZ-0006uM-0G for pgsql-performance@postgresql.org; Thu, 29 Mar 2012 19:40:10 +0000 X-Originating-IP: 217.70.178.136 Received: from mfilter7-d.gandi.net (mfilter7-d.gandi.net [217.70.178.136]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id CBD65172071; Thu, 29 Mar 2012 21:39:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter7-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter7-d.gandi.net (mfilter7-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id R1PEZXU76orl; Thu, 29 Mar 2012 21:39:41 +0200 (CEST) X-Originating-IP: 98.27.54.176 Received: from [192.168.10.146] (cpe-098-027-054-176.nc.res.rr.com [98.27.54.176]) (Authenticated sender: adsend@dunslane.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id AB50B172076; Thu, 29 Mar 2012 21:39:39 +0200 (CEST) Message-ID: <4F74BA78.4090506@dunslane.net> Date: Thu, 29 Mar 2012 15:39:36 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Bob Lunney CC: "Campbell, Lance" , "pgsql-performance@postgresql.org" Subject: Re: database slowdown while a lot of inserts occur References: <1333049228.99470.YahooMailNeo@web162801.mail.bf1.yahoo.com> In-Reply-To: <1333049228.99470.YahooMailNeo@web162801.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/182 X-Sequence-Number: 46632 On 03/29/2012 03:27 PM, Bob Lunney wrote: > Lance, > > May small inserts cause frequent fsyncs. Is there any way those small > inserts can be batched into some larger sets of inserts that use copy > to perform the load? Or possibly a prepared statement called many times in a single transaction, if you're not using that already. It's not as efficient as COPY, but it's often a much less extensive change to the code. cheers andrew