Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B6EBF9FB399 for ; Thu, 12 Oct 2006 13:43:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 35974-05 for ; Thu, 12 Oct 2006 16:43:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from servata.com (ip-216-152-249-241.servata.com [216.152.249.241]) by postgresql.org (Postfix) with ESMTP id 7CA959FB2F8 for ; Thu, 12 Oct 2006 13:43:13 -0300 (ADT) Received: from [209.162.219.253] (helo=dogma.v10.wvs) by servata.com with esmtpa (Exim 4.50) id 1GY3e2-0002gm-P6; Thu, 12 Oct 2006 09:42:55 -0700 Subject: Re: Hints proposal From: Jeff Davis To: "Jim C. Nasby" Cc: pgsql-performance@postgresql.org In-Reply-To: <20061012151439.GT28647@nasby.net> References: <20061012151439.GT28647@nasby.net> Content-Type: text/plain Date: Thu, 12 Oct 2006 09:42:55 -0700 Message-Id: <1160671375.31966.84.camel@dogma.v10.wvs> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.134 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_HELO_PASS X-Spam-Level: X-Archive-Number: 200610/245 X-Sequence-Number: 21374 On Thu, 2006-10-12 at 10:14 -0500, Jim C. Nasby wrote: > The syntax these hints is something arbitrary. I'm borrowing Oracle's > idea of embedding hints in comments, but we can use some other method if > desired. Right now I'm more concerned with getting the general idea > across. > Is there any advantage to having the hints in the queries? To me that's asking for trouble with no benefit at all. It would seem to me to be better to have a system catalog that defined hints as something like: "If user A executes a query matching regex R, then coerce (or force) the planner in this way." I'm not suggesting that we do that, but it seems better then embedding the hints in the queries themselves. Regards, Jeff Davis