pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: William Yu <wyu@talisys.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Maximum Possible Insert Performance?
Date: Sun, 23 Nov 2003 23:21:33 -0500
Message-ID: <2408.1069647693@sss.pgh.pa.us> (raw)
In-Reply-To: <bprv1q$1j5o$1@news.hub.org>
References: <bprv1q$1j5o$1@news.hub.org>

William Yu <wyu@talisys.com> writes:
> [ we don't care about data integrity ]
> I already have fsync off. Short of buying more hardware -- which I will 
> probably do anyways once I figure out whether I need more CPU, memory or 
> disk -- what else can I do to max out the speed? Operation mix is about 
> 50% select, 40% insert, 10% update.

Batch operations so you commit more than one insert per transaction.
(With fsync off, this isn't such a killer consideration as it would be
with fsync on, but the per-transaction overhead is still nontrivial.)

Get rid of as many integrity constraints as you feel can reasonably be
postponed to the final upload.  FK checks are particularly painful.

Eliminate indexes where possible.

Also (I hate to say this, but...) you should consider using Some Other
Database.  "I don't care about data integrity, only speed" sounds like
a good fit to MySQL ...

			regards, tom lane



view thread (19+ messages)  latest in thread

Message-ID: <2408.1069647693@sss.pgh.pa.us>
Permalink:  ../2408.1069647693@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2408.1069647693@sss.pgh.pa.us

 · 

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-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, wyu@talisys.com
  Subject: Re: Maximum Possible Insert Performance?
  In-Reply-To: <2408.1069647693@sss.pgh.pa.us>

* 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