Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 505719FB414 for ; Thu, 5 Apr 2007 18:51:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 88476-07 for ; Thu, 5 Apr 2007 18:51:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by postgresql.org (Postfix) with ESMTP id 416B69FB3AA for ; Thu, 5 Apr 2007 18:51:51 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id k3so1042693ugf for ; Thu, 05 Apr 2007 14:51:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; b=JdIOBk0JiAiaP1eq4OfNxYKLxqxF6keILMUuBgjFdwTx/N1eVRWCA1+yw7gAU8Klzz+mnTTcVlzu941G7OAejNy14OepW7npfycR+KampI1ZxyXVqFX2KawkT+Dzk1WVTZXhYtj6lJrjOzpcfdcwv7A/DBMLGraOIccfJLwULhQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; b=kbJ16fNHr/603VtOs4fOjIyeprVBpGFJhFMxKKTRAOaNABNsS2xGR1mzcI572BeksnmnidFB8ItmhkXqXMoztsFy/IExUXDVExJ6CBdo0o1YedXaXjQ8HA2zjQPNALIfDYBoEO7yaqOomCX7cAWnrdqEgzgtCs69+zamUipBcCs= Received: by 10.66.250.17 with SMTP id x17mr2500450ugh.1175809909783; Thu, 05 Apr 2007 14:51:49 -0700 (PDT) Received: from ?192.168.128.42? ( [62.94.43.82]) by mx.google.com with ESMTP id 30sm4198824ugf.2007.04.05.14.51.48; Thu, 05 Apr 2007 14:51:49 -0700 (PDT) To: "Dave Dutcher" Subject: Re: Weird performance drop Date: Thu, 5 Apr 2007 23:52:45 +0200 User-Agent: KMail/1.9.5 Cc: pgsql-performance@postgresql.org References: <01ea01c772d8$7b87aca0$2e00a8c0@tridecap.com> In-Reply-To: <01ea01c772d8$7b87aca0$2e00a8c0@tridecap.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704052352.45683.Vincenzo.Romano@gmail.com> From: Vincenzo Romano X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/139 X-Sequence-Number: 24016 On Friday 30 March 2007 16:34 Dave Dutcher wrote: > > From: pgsql-performance-owner@postgresql.org > > [mailto:pgsql-performance-owner@postgresql.org] On Behalf Of > > Vincenzo Romano > > > > Is there any "workaround"? > > > > In my opinion the later the query planner decisions are taken the more > > effective they can be. > > It could be an option for the function (body) to delay any > > query planner > > decision. > > I think a possible workaround is to use a plpgsql function and the execute > statement. The docs will have more info. > > Dave Aye sir. It works. There's not much details into the documentation but the real point is that the execute command of the PLPg/SQL actually says the DB to delay the query planning process as late as possible, I have also managed to build search functions at runtime using the execute command with a dynamically built text variable. Complex, error prone but really fast. -- Vincenzo Romano ---- Maybe Computers will never become as intelligent as Humans. For sure they won't ever become so stupid. [VR-1987]