X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ABC7A533BB for ; Tue, 29 Mar 2005 17:38:39 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10882-01 for ; Tue, 29 Mar 2005 16:38:29 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 7898552A65 for ; Tue, 29 Mar 2005 17:38:29 +0100 (BST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 9AB07354B1; Tue, 29 Mar 2005 08:38:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 88B223547F; Tue, 29 Mar 2005 08:38:28 -0800 (PST) Date: Tue, 29 Mar 2005 08:38:28 -0800 (PST) From: Stephan Szabo To: Tom Lane Cc: Simon Riggs , Karim A Nassar , Christopher Kings-Lynne , pgsql-performance@postgresql.org Subject: Re: Delete query takes exorbitant amount of time In-Reply-To: <21616.1112108201@sss.pgh.pa.us> Message-ID: <20050329083336.G58020@megazone.bigpanda.com> References: <1112095776.11750.958.camel@localhost.localdomain> <20050329054714.V50612@megazone.bigpanda.com> <20050329061837.A51620@megazone.bigpanda.com> <21616.1112108201@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/638 X-Sequence-Number: 11343 On Tue, 29 Mar 2005, Tom Lane wrote: > Stephan Szabo writes: > > If there were some way to pass a "limit" into SPI_prepare that was treated > > similarly to a LIMIT clause for planning purposes but didn't actually > > change the output plan to only return that number of rows, we could use > > that. > > Hmm ... the planner does have the ability to do that sort of thing (we > use it for cursors). SPI_prepare doesn't expose the capability. > Perhaps adding a SPI_prepare variant that does expose it would be the > quickest route to a solution. > > I get a headache every time I look at the RI triggers ;-). Do they Me too, honestly. > always know at the time of preparing a plan which way it will be used? I believe so. I think each saved plan pretty much lives for a single trigger type/argument set and is basically used in only one place.