Skip site navigation (1) Skip section navigation (2)

Re: Maximum Possible Insert Performance?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: William Yu <wyu(at)talisys(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Maximum Possible Insert Performance?
Date: 2003-11-24 04:21:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
William Yu <wyu(at)talisys(dot)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

In response to

pgsql-performance by date

Next:From: Josh BerkusDate: 2003-11-24 04:29:04
Subject: Re: Maximum Possible Insert Performance?
Previous:From: William YuDate: 2003-11-24 03:48:13
Subject: Maximum Possible Insert Performance?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group