Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CFC069FBDBC for ; Wed, 20 Jun 2007 04:49:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 56384-01 for ; Wed, 20 Jun 2007 04:49:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from h07.llord.com (unknown [195.140.142.194]) by postgresql.org (Postfix) with ESMTP id BECF09FBCF1 for ; Wed, 20 Jun 2007 04:49:12 -0300 (ADT) Received: from par69-8-88-161-102-87.fbx.proxad.net ([88.161.102.87] helo=apollo13) by h07.llord.com with esmtpa (Exim 4.66) (envelope-from ) id 1I0uvl-0006FP-Kn; Wed, 20 Jun 2007 09:48:45 +0200 Date: Wed, 20 Jun 2007 09:49:02 +0200 To: "Tom Lane" , "Greg Smith" Subject: Re: Volunteer to build a configuration tool From: PFC Cc: pgsql-performance@postgresql.org Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <1182298719.4482.133.camel@ipso.snappymail.ca> <7621.1182318230@sss.pgh.pa.us> <9001.1182323187@sss.pgh.pa.us> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <9001.1182323187@sss.pgh.pa.us> User-Agent: Opera Mail/9.10 (Linux) X-PopBeforeSMTPSenders: junk@peufeu.com, lists@peufeu.com, peufeu@peufeu.com, pfcaillaud@peufeu.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - h07.llord.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - peufeu.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.103 tagged_above=0 required=5 tests=AWL=1.102, BAYES_50=0.001 X-Spam-Level: * X-Archive-Number: 200706/406 X-Sequence-Number: 25439 > To me, the worst catch-22 we face in this area is that we'd like the > optimizer's choices of plan to be stable and understandable, but the > real-world costs of queries depend enormously on short-term conditions > such as how much of the table has been sucked into RAM recently by > other queries. I have no good answer to that one. Yeah, there is currently no way to tell the optimizer things like : - this table/portion of a table is not frequently accessed, so it won't be in the cache, so please use low-seek plans (like bitmap index scan) - this table/portion of a table is used all the time so high-seek-count plans can be used like index scan or nested loops since everything is in RAM Except planner hints (argh) I see no way to give this information to the machine... since it's mostly in the mind of the DBA. Maybe a per-table "cache temperature" param (hot, warm, cold), but what about the log table, the end of which is cached, but not the old records ? It's messy. Still PG does a pretty excellent job most of the time.