Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 44E231337990 for ; Fri, 29 Apr 2011 19:00:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 20057-01-10 for ; Fri, 29 Apr 2011 22:00:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id 7E6CE13380D1 for ; Fri, 29 Apr 2011 18:37:50 -0300 (ADT) Received: from [192.168.1.3] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LzWb8-1PklNA18OA-014j8f; Fri, 29 Apr 2011 23:37:47 +0200 Message-ID: <4DBB2FA3.8010104@2ndquadrant.com> Date: Fri, 29 Apr 2011 17:37:39 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: James Mansion CC: Robert Haas , Claudio Freire , Tomas Vondra , pgsql-performance@postgresql.org Subject: Re: Performance References: <20110412171855.GA14292@tux> <4DA496FA.3070908@fuzzy.cz> <8F22D592-23C1-4A3C-94A5-48363332ADD3@darkstatic.com> <4DA4BFA2.5060601@fuzzy.cz> <4DA4D40A.4010200@fuzzy.cz> <4DA56DA8020000250003C783@gw.wicourts.gov> <4DA6216E.9020907@fuzzy.cz> <4DA63125.5070106@fuzzy.cz> <4DBA75DC.6070506@mansionfamily.plus.com> <4DBB09B5.80108@2ndquadrant.com> <4DBB1F29.6010407@mansionfamily.plus.com> In-Reply-To: <4DBB1F29.6010407@mansionfamily.plus.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:Ib2TGHRWnWUnnBFpTCrVXol4xwq+N9RjUaWkvI3EutG zWwVLHSjdfKvs8hDFSqDU2xL/gaS3PygJSGPhqy8f0JgiXcSUD wjBQ9ke/EMA4oPn6wM2++k9d/upDU9Bs0XiIhBGebIEm6KXc9Z h5q7wVHp+3d6frPGUt4I3Sfz7Kh+NXJ2JzTAsiF/vModv77GGm zHUkoWvrGSskcr/M8Tk4XJoV1W/CSCBb651aRx8HUk= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201104/425 X-Sequence-Number: 43487 James Mansion wrote: > I thought I was clear that it should present some stats to the DBA, > not that it would try to auto-tune? You were. But people are bound to make decisions about how to retune their database based on that information. The situation when doing manual tuning isn't that much different, it just occurs more slowly, and with the potential to not react at all if the data is incoherent. That might be better, but you have to assume that a naive person will just follow suggestions on how to re-tune based on that the same way an auto-tune process would. I don't like this whole approach because it takes something the database and DBA have no control over (read timing) and makes it a primary input to the tuning model. Plus, the overhead of collecting this data is big relative to its potential value. Anyway, how to collect this data is a separate problem from what should be done with it in the optimizer. I don't actually care about the collection part very much; there are a bunch of approaches with various trade-offs. Deciding how to tell the optimizer about what's cached already is the more important problem that needs to be solved before any of this takes you somewhere useful, and focusing on the collection part doesn't move that forward. Trying to map the real world into the currently exposed parameter set isn't a solvable problem. We really need cached_page_cost and random_page_cost, plus a way to model the cached state per relation that doesn't fall easily into feedback loops. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books