Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 5D3169FB3B6 for ; Thu, 12 Oct 2006 14:21:21 -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 80342-06 for ; Thu, 12 Oct 2006 14:21:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.ecircle.de (mail.ecircle.de [195.140.186.200]) by postgresql.org (Postfix) with ESMTP id 1AC439FB399 for ; Thu, 12 Oct 2006 14:21:17 -0300 (ADT) Received: from einstein.muc.ecircle.de (unknown [192.168.1.7]) by mail.ecircle.de (READY) with ESMTP id 272DA6546F1; Thu, 12 Oct 2006 19:21:16 +0200 (CEST) Received: from [192.168.1.91] ([192.168.1.91]) by einstein.muc.ecircle.de with Microsoft SMTPSVC(6.0.3790.1830); Thu, 12 Oct 2006 19:15:41 +0200 Subject: Re: Hints proposal From: Csaba Nagy To: Jeff Davis Cc: "Jim C. Nasby" , postgres performance list In-Reply-To: <1160671375.31966.84.camel@dogma.v10.wvs> References: <20061012151439.GT28647@nasby.net> <1160671375.31966.84.camel@dogma.v10.wvs> Content-Type: text/plain Message-Id: <1160673340.28751.83.camel@coppola.muc.ecircle.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 12 Oct 2006 19:15:40 +0200 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Oct 2006 17:15:41.0478 (UTC) FILETIME=[0B6F4C60:01C6EE22] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.175 tagged_above=0 required=5 tests=AWL, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/251 X-Sequence-Number: 21380 > I'm not suggesting that we do that, but it seems better then embedding > the hints in the queries themselves. OK, what about this: if I execute the same query from a web client, I want the not-so-optimal-but-safe plan, if I execute it asynchronously, I let the planner choose the best-overall-performance-but-sometimes-may-be-slow plan ? What kind of statistics/table level hinting will get you this ? I would say only query level hinting will buy you query level control. And that's perfectly good in some situations. I really can't see why a query-level hinting mechanism is so evil, why it couldn't be kept forever, and augmented with the possibility of correlation hinting, or table level hinting. These are really solving different problems, with some overlapping... Cheers, Csaba.