X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A818CD1C943 for ; Mon, 24 Nov 2003 04:22:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 77687-03 for ; Mon, 24 Nov 2003 00:21:35 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 8AB26D1D607 for ; Mon, 24 Nov 2003 00:21:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hAO4LX19002409; Sun, 23 Nov 2003 23:21:33 -0500 (EST) To: William Yu Cc: pgsql-performance@postgresql.org Subject: Re: Maximum Possible Insert Performance? In-reply-to: References: Comments: In-reply-to William Yu message dated "Sun, 23 Nov 2003 19:48:13 -0800" Date: Sun, 23 Nov 2003 23:21:33 -0500 Message-ID: <2408.1069647693@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/202 X-Sequence-Number: 4762 William Yu 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