Re: [INTERFACES] Performance

From: Tom Ivar Helbekkmo <tih(at)Norway(dot)EU(dot)net>
To: Steven Bradley <sbradley(at)llnl(dot)gov>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Performance
Date: 1999-06-24 06:23:08
Message-ID: 86g13i86cz.fsf@athene.i.eunet.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Steven Bradley <sbradley(at)llnl(dot)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"

In response to

  • Performance at 1999-06-23 22:05:09 from Steven Bradley

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Meskes 1999-06-24 06:52:07 Re: [INTERFACES] ECPG fetch broken after upgrade to 6.5
Previous Message Tim Allen 1999-06-24 04:29:58 Peculiar behaviour in libpq