Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.databases.postgresql Subject: Re: pg_hint_plan Date: Tue, 17 Feb 2015 08:29:55 +0100 Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net JgNnFMNprZJirVtlNZCDlAiMEXqi3DOKF/5q4Ncr4kkG2u6xk= Cancel-Lock: sha1:4INwQYs2qkv96fgCdrHdHuV6440= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: Xref: csiph.com comp.databases.postgresql:635 On 16.02.2015 15:24, Dimitri Fontaine wrote: > Again, as soon as you use hints, then you need to review every once in a > while that they are still effective, because they won't be re-evaluated > against data growth as the usual PostgreSQL statistics system are. Ideally your database monitoring would catch queries that deteriorate - be it because of hints or other reasons. > Also > each new version of PostgreSQL will come with a better planner and > optimiser, so you will need to review all hints and remove the rotted > ones. Yes, hints rot. You will want to do testing with any new version of PostgreSQL before it goes into production anyway - regardless whether you use hints or not. While I agree to the general tendency to rather use automated mechanisms of finding a proper plan, this is not a differentiator or a reason against hints IMHO. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/