Re: [INTERFACES] Performance - Mailing list pgsql-interfaces

From Tom Ivar Helbekkmo
Subject Re: [INTERFACES] Performance
Date
Msg-id 86g13i86cz.fsf@athene.i.eunet.no
Whole thread Raw
In response to Performance  (Steven Bradley <sbradley@llnl.gov>)
List pgsql-interfaces
Steven Bradley <sbradley@llnl.gov> writes:

> I have simplified the problem down to a single (non-indexed) table with
> about a half-dozen columns (int4, timestamp, varchar, etc.)   I wrote a
> quick and dirty C program which uses the libpq interface to INSERT records
> into the table in real-time.  The best performance I could achieve was on
> the order of 15 inserts per second.  What I need is something much closer
> to 100 inserts per second.

I actually did pretty much the same thing just as a quick test of
version 6.5 the other day.  On my system (PostgreSQL 6.5 under NetBSD
1.4 on a 350MHz Pentium II with 128MB of RAM, and fast SCSI disks
behind an Adaptec 2940 on a PCI bus), I got about 25 inserts per
second.  I then wrapped the whole series of inserts in a BEGIN/END
block.  This increased the speed to about 1000 inserts per second.
Yup.  A thousand.  That's 40 times the speed.  Pretty cool.  :-)

For the actual application I have in mind, I'll be dropping BEGIN and
END statements into the command stream based on insert rate, I think.

-tih
-- 
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"


pgsql-interfaces by date:

Previous
From: Tim Allen
Date:
Subject: Peculiar behaviour in libpq
Next
From: Peter Mount
Date:
Subject: RE: [INTERFACES] RE: PG6.5 + JDBC + Linux + Kaffe