Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 66DE59FB4BE for ; Thu, 12 Oct 2006 15:22:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 07976-01 for ; Thu, 12 Oct 2006 15:21:58 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by postgresql.org (Postfix) with ESMTP id AE3CD9FB2C3 for ; Thu, 12 Oct 2006 15:21:57 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id 30so318234ugc for ; Thu, 12 Oct 2006 11:21:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aYUdEBU8KGd/IcAfpAAaSTBLx3soQry6Z5dPIFq3uJFdFxB0yM/kWQKfTV5smPxeiOWsBfdANpGDPA8DQEBVpSsB9rcyl8g/8boXBkoyExyQcoOJK3GpijJNweQrn14E0MAYrd9bw2Yvw/qQG4DkvjccWzpf6zzc6TU/cDWSD5U= Received: by 10.78.201.10 with SMTP id y10mr2616587huf; Thu, 12 Oct 2006 11:21:55 -0700 (PDT) Received: by 10.78.35.18 with HTTP; Thu, 12 Oct 2006 11:21:55 -0700 (PDT) Message-ID: Date: Thu, 12 Oct 2006 14:21:55 -0400 From: "Merlin Moncure" To: "Andrew Sullivan" Subject: Re: [PERFORM] Hints proposal Cc: pgsql-hackers@postgresql.org In-Reply-To: <20061012174503.GA29203@phlogiston.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061012151439.GT28647@nasby.net> <10866.1160667752@sss.pgh.pa.us> <20061012162525.GF28647@nasby.net> <20061012174503.GA29203@phlogiston.dyndns.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.227 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/686 X-Sequence-Number: 92583 On 10/12/06, Andrew Sullivan wrote: > On Thu, Oct 12, 2006 at 11:25:25AM -0500, Jim C. Nasby wrote: > > Yes, but it does one key thing: allows DBAs to fix problems *NOW*. See > > also my comment below. > > If I may argue in the other direction, speaking as one whose career > (if we may be generous enough to call it that) has been pretty much > exclusively on the operations end of things, I think that's an awful > idea. > > There are two ways that quick-fix solve-the-problem-now hints are > going to be used. One is in the sort of one-off query that a DBA has third way: to solve the problem of data (especially constants) not being available to the planner at the time the plan was generated. this happens most often with prepared statements and sql udfs. note that changes to the plan generation mechanism (i think proposed by peter e a few weeks back) might also solve this. In a previous large project I had to keep bitmap scan and seqscan off all the time because of this problem (the project used a lot of prepared statements). or am i way off base here? merlin