Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBDJHQm83983 for ; Thu, 13 Dec 2001 14:17:26 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 8BF0FD5F1; Thu, 13 Dec 2001 11:17:26 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 819515BEE; Thu, 13 Dec 2001 11:17:26 -0800 (PST) Date: Thu, 13 Dec 2001 11:17:26 -0800 (PST) From: Stephan Szabo To: MindTerm Cc: Subject: Re: performance tuning in large function / transaction In-Reply-To: <20011213162729.98316.qmail@web20210.mail.yahoo.com> Message-ID: <20011213111529.A2574-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/131 X-Sequence-Number: 5954 On Thu, 13 Dec 2001, MindTerm wrote: > Hi all, > > I am writing a large function which perform more > than 2000 modify statements ( delete / insert ) . The > execution time of this function is not acceptable. How > can I config postgresql ( in postgresql.conf ?? ) so > that the performance will be better ? The machine > runing postgresql have spare memory and harddisk > space. It's hard without more information, is the function like an internal function or do you mean an external one? In the latter case, the first thing to do is make sure you're not in autocommit (ie, you've begun a transaction) since otherwise you're doing 2000 separate transactions. The settings that are the first to look at in the postgresql.conf are shared_buffers and sort_mem.