pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Ivar Helbekkmo <tih@Norway.EU.net>
To: Steven Bradley <sbradley@llnl.gov>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Performance
Date: 24 Jun 1999 08:23:08 +0200
Message-ID: <86g13i86cz.fsf@athene.i.eunet.no> (raw)
References: <3.0.5.32.19990623150509.0092e990@poptop.llnl.gov>

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"



view thread (8+ messages)  latest in thread

Message-ID: <86g13i86cz.fsf@athene.i.eunet.no>
Permalink:  ../86g13i86cz.fsf@athene.i.eunet.no/
Also on:    postgresql.org/message-id/86g13i86cz.fsf@athene.i.eunet.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tih@Norway.EU.net, sbradley@llnl.gov
  Subject: Re: [INTERFACES] Performance
  In-Reply-To: <86g13i86cz.fsf@athene.i.eunet.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox