Re: pgsql inserts problem - Mailing list pgsql-performance

From Shridhar Daithankar
Subject Re: pgsql inserts problem
Date
Msg-id 3F4DF3EA.6723.338F5D1@localhost
Whole thread Raw
In response to pgsql inserts problem  (Tarhon-Onu Victor <mituc@iasi.rdsnet.ro>)
List pgsql-performance
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.


pgsql-performance by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Queries sometimes take 1000 times the normal time
Next
From: Tomka Gergely
Date:
Subject: Re: Hardware recommendations to scale to silly load