Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E14D796C49C for ; Sat, 18 Feb 2012 13:33:12 -0400 (AST) Received: from mailout01.ims-firmen.de ([213.174.32.96]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ryo9l-0003Ko-Iy for pgsql-performance@postgresql.org; Sat, 18 Feb 2012 17:33:12 +0000 Received: from mailin01.ims-firmen.de ([192.168.1.110]) by mailout01.ims-firmen.de with esmtp (envelope-from ) id 1Ryo9Y-0004zM-MR for pgsql-performance@postgresql.org; Sat, 18 Feb 2012 18:32:56 +0100 Received: from [87.170.212.208] (helo=a-kretschmer.de) by mailin01.ims-firmen.de with esmtpsa (TLSv1:AES256-SHA:256) (envelope-from ) id 1Ryo9Y-0002tw-HU for pgsql-performance@postgresql.org; Sat, 18 Feb 2012 18:32:56 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.69) (envelope-from ) id 1Ryo9X-0007lM-Mp for pgsql-performance@postgresql.org; Sat, 18 Feb 2012 18:32:55 +0100 Date: Sat, 18 Feb 2012 18:32:55 +0100 From: Andreas Kretschmer To: pgsql-performance@postgresql.org Subject: Re: Query slow as Function Message-ID: <20120218173255.GA29781@tux> References: <20120218160244.GA23315@tux> <27854.1329583042@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <27854.1329583042@sss.pgh.pa.us> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/136 X-Sequence-Number: 46308 Tom Lane wrote: > Andreas Kretschmer writes: > > You can check the plan with the auto_explain - Extension, and you can > > force the planner to create a plan based on the actual input-value by > > using dynamic SQL (EXECUTE 'your query string' inside the function) > > Steve *is* using EXECUTE, so that doesn't seem to be the answer. I'm Ohhh yes, my fault, sorry... Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°