X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9B027D1B8AB for ; Thu, 28 Aug 2003 06:50:48 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 69792-08 for ; Thu, 28 Aug 2003 03:50:18 -0300 (ADT) Received: from smtp.pspl.co.in (unknown [202.54.11.65]) by svr1.postgresql.org (Postfix) with ESMTP id 9FED0D1B4F0 for ; Thu, 28 Aug 2003 03:50:10 -0300 (ADT) Received: (from root@localhost) by smtp.pspl.co.in (8.12.9/8.12.9) id h7S6sX1N026251 for ; Thu, 28 Aug 2003 12:24:33 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) (authenticated bits=0) by persistent.co.in (8.12.9/8.12.9) with ESMTP id h7S6sWhi026238 for ; Thu, 28 Aug 2003 12:24:32 +0530 From: "Shridhar Daithankar" To: pgsql-performance@postgresql.org Date: Thu, 28 Aug 2003 12:22:02 +0530 MIME-Version: 1.0 Subject: Re: pgsql inserts problem Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3F4DF3EA.6723.338F5D1@localhost> In-reply-to: X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/392 X-Sequence-Number: 3208 On 27 Aug 2003 at 15:50, Tarhon-Onu Victor wrote: > > Hi, > > I have a (big) problem with postgresql when making lots of > inserts per second. I have a tool that is generating an output of ~2500 > lines per seconds. I write a script in PERL that opens a pipe to that > tool, reads every line and inserts data. > I tryed both commited and not commited variants (the inserts > were commited at every 60 seconds), and the problem persists. Assuming one record per line, you are committing after 150K records, that's not good. Try committing every 5 seconds. And open more than one conenction. That will certainly improve performance. Afterall concurrency is biggest assset of postgresql. Fiddle around with combination and see which works best for you. Bye Shridhar -- Mencken and Nathan's Ninth Law of The Average American: The quality of a champagne is judged by the amount of noise the cork makes when it is popped.