Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C47886325C4 for ; Mon, 8 Mar 2010 13:29:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 71496-09 for ; Mon, 8 Mar 2010 17:28:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from is.rice.edu (is.rice.edu [128.42.42.24]) by mail.postgresql.org (Postfix) with ESMTP id 4D0D963233A for ; Mon, 8 Mar 2010 13:28:57 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by is.rice.edu (Postfix) with ESMTP id 4799C4181C; Mon, 8 Mar 2010 11:31:50 -0600 (CST) Received: from is.rice.edu ([127.0.0.1]) by localhost (it.is.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11799-09; Mon, 8 Mar 2010 11:31:44 -0600 (CST) Received: by is.rice.edu (Postfix, from userid 18612) id 3B4CE41819; Mon, 8 Mar 2010 11:31:44 -0600 (CST) Date: Mon, 8 Mar 2010 11:31:43 -0600 From: Kenneth Marshall To: Kevin Kempter Cc: pgsql-performance@postgresql.org Subject: Re: prepared statements and partitioning (partition elimination not working) Message-ID: <20100308173143.GD19562@it.is.rice.edu> References: <201003081024.56840.kevink@consistentstate.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003081024.56840.kevink@consistentstate.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: by amavis-2.2.1 at is.rice.edu X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.443 tagged_above=-10 required=5 tests=BAYES_00=-2.599, SUBJECT_FUZZY_TION=0.156 X-Spam-Level: X-Archive-Number: 201003/73 X-Sequence-Number: 37898 On Mon, Mar 08, 2010 at 10:24:56AM -0700, Kevin Kempter wrote: > Hi all; > > we've found that partition elimination is not happening for a prepared > statement, however running the same statement in psql manually does give us > partition elimination. > > Is this a known issue? > Yes, see the recent threads on performance of prepared queries. It concerns the availability of information on the query inputs that is available to psql and not a pre-prepared query. Cheers, Ken