Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 40C932E002D for ; Thu, 17 Apr 2008 13:11:15 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 87573-03 for ; Thu, 17 Apr 2008 13:11:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outmail136049.authsmtp.co.uk (outmail136049.authsmtp.co.uk [62.13.136.49]) by developer.postgresql.org (Postfix) with ESMTP id 6A76A2E007F for ; Thu, 17 Apr 2008 13:11:08 -0300 (ADT) Received: from mail.authsmtp.com (mail.authsmtp.com [62.13.128.187]) by punt3.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id m3HGB3O1059590; Thu, 17 Apr 2008 17:11:04 +0100 (BST) Received: from [192.168.0.3] (85-211-74-64.dyn.gotadsl.co.uk [85.211.74.64]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m3HGB2pZ021442; Thu, 17 Apr 2008 17:11:02 +0100 (BST) Subject: Re: SQL Function Slowness, 8.3.0 From: Simon Riggs To: Tom Lane Cc: "Gavin M. Roy" , pgsql-performance@postgresql.org In-Reply-To: <8328.1208358587@sss.pgh.pa.us> References: <8328.1208358587@sss.pgh.pa.us> Content-Type: text/plain Date: Thu, 17 Apr 2008 17:12:31 +0100 Message-Id: <1208448751.4259.317.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: e022bd58-0c98-11dd-941c-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadRtFaQJbbElD HGQLW1xEUVp7WGJ/ awgfZQBDYEtPQQJu Tk5NXVBXCwUmXB95 cWwcEnNydQRCfHw+ ZENgWj4OXEZ4JxJ4 SlNURmQOeGZhPDQC WURZJB5UcAJLdhoR aVd4ByJDAzANdhEA MjUdGAoUCH1kEQAd bBwLJk4TRkBDJTo7 WBYPBi5rVR1DHGNr RyAn X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:932/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/238 X-Sequence-Number: 29731 On Wed, 2008-04-16 at 11:09 -0400, Tom Lane wrote: > "Gavin M. Roy" writes: > > In 8.3.0, I'm seeing some oddities with SQL functions which I thought were > > immune to the planner data restrictions of plpgsql functions and the sort. > > Without a specific example this discussion is pretty content-free, but > in general SQL functions face the same hazards of bad parameterized > plans as plpgsql functions do. I think it would help if there was some way to prepare functions to allow them to be posted and understood more easily. These would help: * a name obfuscator, so people can post functions without revealing inner workings of their company and potentially lose intellectual property rights over code posted in that way * a pretty printer, so we can better understand them when we see 'em Without these, I think we need to realise that many people will never post their SQL at all. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com