pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John huttley <john@mwk.co.nz>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Need for speed
Date: Mon, 9 Sep 2002 11:39:46 +1200
Message-ID: <005601c25791$03ca28d0$041f1fac@termsrvr> (raw)
References: <HKEIIDPFPDBMOMDLIEEGIELKCOAA.iavor.raytchev@verysmall.org>

Hello, I'm writing an application in C and speed is critical.

I'm doing inserts into 2 tables, both with only a few char fields.
1 insert using 'INSERT'
5 inserts using 'COPY'

and there is a BEGIN and COMMIT around them.
There are as few indexes as I can have and still query effectively.
I cannot drop and recreate the indexes, since there will be asynchronous
queries.

I can't get more than 97 of these transactions per second.
There will be 100 Million transactions or more. presently 150,000.
So I would like x10 speed increase!!

Postmaster shows 50->65% usage, system idle is 10->15% (700Mhz Althon, 386Mb
RAM)

vmstat shows about 20 Blks/in and 1500 Blks/out  per sec.

The disk is a 10000RPM SCSI.

How can I get more speed?
Should I try and get more inserts into each transaction? (Do BEGIN/COMMIT in
separate thread with timer)
Do you think its worth the effort to make that remaining INSERT into a COPY?
Would managing a pool of asynchronous calls improve the speed?
What about this fast path thing? it looks very complicated and under
documented..

Any advice greatfully received,

Regards

John





Message-ID: <005601c25791$03ca28d0$041f1fac@termsrvr>
Permalink:  ../005601c25791$03ca28d0$041f1fac@termsrvr/
Also on:    postgresql.org/message-id/005601c25791$03ca28d0$041f1fac@termsrvr

 · 

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: john@mwk.co.nz
  Subject: Re: Need for speed
  In-Reply-To: <005601c25791$03ca28d0$041f1fac@termsrvr>

* 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