Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbEHK-0004D9-Ki for pgsql-performance@postgresql.org; Wed, 21 Nov 2012 17:40:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TbEHI-00046s-Ve for pgsql-performance@postgresql.org; Wed, 21 Nov 2012 17:40:01 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qALHdkjo006610; Wed, 21 Nov 2012 12:39:46 -0500 (EST) From: Tom Lane To: Craig James cc: Joe Conway , Heikki Linnakangas , Kevin Grittner , Craig Ringer , Claudio Freire , Merlin Moncure , David Greco , pgsql-performance@postgresql.org Subject: Re: Hints (was Poor performance using CTE) In-reply-to: References: <20121121134232.68590@gmx.com> <50ACFBBD.30204@vmware.com> <50AD0EA0.7070009@joeconway.com> Comments: In-reply-to Craig James message dated "Wed, 21 Nov 2012 09:28:35 -0800" Date: Wed, 21 Nov 2012 12:39:46 -0500 Message-ID: <6609.1353519586@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) X-Archive-Number: 201211/243 X-Sequence-Number: 48609 Craig James writes: > On Wed, Nov 21, 2012 at 9:25 AM, Joe Conway wrote: >> I like this idea, but also think that if we have a syntax to allow >> hints, it would be nice to have a simple way to ignore all hints (yes, I >> suppose I'm suggesting yet another GUC). That way after sprinkling your >> SQL with hints, you could easily periodically (e.g. after a Postgres >> upgrade) test what would happen if the hints were removed. > Or a three-way choice: Allow, ignore, or generate an error. That would > allow developers to identify where hints are being used. Throwing errors would likely prevent you from reaching all parts of your application, thus preventing complete testing. Much more sensible to just log such queries. regards, tom lane