X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3D899565F6 for ; Tue, 22 Mar 2005 22:58:31 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13988-01 for ; Tue, 22 Mar 2005 22:58:22 +0000 (GMT) Received: from ylpvm15.prodigy.net (ylpvm15-ext.prodigy.net [207.115.57.46]) by svr1.postgresql.org (Postfix) with ESMTP id 21A19565F5 for ; Tue, 22 Mar 2005 22:58:21 +0000 (GMT) Received: from one (adsl-69-105-230-85.dsl.pltn13.pacbell.net [69.105.230.85]) by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j2MMsLba003973; Tue, 22 Mar 2005 17:54:21 -0500 Received: from [192.168.5.100] (unknown [192.168.5.100]) by one (Postfix) with ESMTP id 692C7F1D0E; Tue, 22 Mar 2005 14:58:20 -0800 (PST) Message-ID: <4240A360.1030904@cheapcomplexdevices.com> Date: Tue, 22 Mar 2005 14:59:44 -0800 From: Ron Mayer User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane , pgsql-performance@postgresql.org, Ron Mayer Subject: Re: What about utility to calculate planner cost constants? References: <200503210951.06044.josh@agliodbs.com> <87acowcmut.fsf@stark.xeocode.com> <10759.1111516477@sss.pgh.pa.us> <87is3j9xql.fsf@stark.xeocode.com> <14922.1111528095@sss.pgh.pa.us> In-Reply-To: <14922.1111528095@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/478 X-Sequence-Number: 11183 Tom Lane wrote: > > And you can't just dismiss the issue of wrong cost models and say we can > get numbers anyway. Is there a way to see more details about the cost estimates. EXPLAIN ANALYZE seems to show the total time and rows; but not information like how many disk pages were accessed. I get the feeling that sometimes the number of rows is estimated very well, but the amount of disk I/O is way off. Sometimes the number of pages read/written is grossly overestimated (if tables lave a lot of locally clustered data) or underestimated if a sort barely exceeds sort_mem. Perhaps an EXPLAN ANALYZE VERBOSE that would add info like this: Index scan ([...]estimated 1000 pages read) (actual[...] 10 pages read) would help track those down?