Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA46762 for ; Thu, 24 Jun 1999 02:23:11 -0400 (EDT) (envelope-from tih@Norway.EU.net) Received: from athene.i.eunet.no (IDENT:root@athene.i.eunet.no [193.71.2.52]) by mail-relay.eunet.no (8.9.3/8.9.3/GN) with ESMTP id IAA38973; Thu, 24 Jun 1999 08:23:09 +0200 (CEST) Received: (from tih@localhost) by athene.i.eunet.no (8.8.8/8.8.8) id IAA07565; Thu, 24 Jun 1999 08:23:08 +0200 (CEST) To: Steven Bradley Cc: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Performance References: <3.0.5.32.19990623150509.0092e990@poptop.llnl.gov> From: Tom Ivar Helbekkmo Date: 24 Jun 1999 08:23:08 +0200 In-Reply-To: Steven Bradley's message of "Wed, 23 Jun 1999 15:05:09 -0700" Message-ID: <86g13i86cz.fsf@athene.i.eunet.no> Lines: 23 X-Mailer: Gnus v5.6.44/Emacs 19.34 Steven Bradley 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"