Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBE8eZm46754 for ; Fri, 14 Dec 2001 03:40:35 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id ADB8DD5F4; Fri, 14 Dec 2001 00:40:35 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id A16595BF0; Fri, 14 Dec 2001 00:40:35 -0800 (PST) Date: Fri, 14 Dec 2001 00:40:35 -0800 (PST) From: Stephan Szabo To: MindTerm Cc: Subject: Re: performance tuning in large function / transaction In-Reply-To: <20011214080549.38940.qmail@web20207.mail.yahoo.com> Message-ID: <20011214003753.X8954-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200112/142 X-Sequence-Number: 5965 On Fri, 14 Dec 2001, MindTerm wrote: > Hi all, > > senario: > > cursor 1 loop ( e.g. find student id ) > cursor 2 loop ( e.g. find courses of this student ) > cursor 3 loop ( e.g. update course information ) > delele course detail ... > or > delete course detail ... ( same primary key ) > insert course detail ... ( same primary key ) > end loop 3 > end loop 2 > end loop 1 > > It did 75 delete actions 140 update actions ( delete > and insert ). The process time was about 5-6 minutes > while oracle was 10 seconds to 20 seconds . Can you send the actual function and table schema for the associated tables and sizes of the tables involved (I figure the data itself is probably not available, but we may be able to see what's going on then)