Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBEEiim97262 for ; Fri, 14 Dec 2001 09:44:47 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 13A76D5EF; Fri, 14 Dec 2001 06:44:48 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 055065BF1; Fri, 14 Dec 2001 06:44:47 -0800 (PST) Date: Fri, 14 Dec 2001 06:44:47 -0800 (PST) From: Stephan Szabo To: MindTerm Cc: Subject: Re: performance tuning in large function / transaction In-Reply-To: <20011214090647.31355.qmail@web20205.mail.yahoo.com> Message-ID: <20011214064148.J11758-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/146 X-Sequence-Number: 5969 On Fri, 14 Dec 2001, MindTerm wrote: > Hi all, > > table : > application : 220 rows ; > usermenu : 6055 rows ; Well, I'd need the other tables involved in the function too, but to start with, try rewriting the queries in the function to use EXISTS rather than IN (see the faq), or bring them into a normal join with the other tables where possible.