X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 422FDD1CA07 for ; Wed, 24 Sep 2003 14:01:27 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 50192-05 for ; Wed, 24 Sep 2003 11:01:20 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 60BF4D1B908 for ; Wed, 24 Sep 2003 11:01:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h8OE1AiP003531; Wed, 24 Sep 2003 10:01:10 -0400 (EDT) To: Manfred Koizar Cc: Jenny Zhang , perf-pgsql , Matt Clark , pgsql-hackers@postgresql.org Subject: Re: [HACKERS] osdl-dbt3 run results - puzzled by the execution In-reply-to: <4sj2nvcla6v5v9e3cr96kopjtda7k6mq8v@email.aon.at> References: <1063924610.31150.75.camel@ibm-a.pdx.osdl.net> <3c6mmvcmvlr59kng6tnee2a0q4vf4spctt@email.aon.at> <1063996535.32392.9.camel@ibm-a.pdx.osdl.net> <4sj2nvcla6v5v9e3cr96kopjtda7k6mq8v@email.aon.at> Comments: In-reply-to Manfred Koizar message dated "Wed, 24 Sep 2003 11:14:19 +0200" Date: Wed, 24 Sep 2003 10:01:09 -0400 Message-ID: <3530.1064412069@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/305 X-Sequence-Number: 3671 Manfred Koizar writes: > Cutting down the number of heap page fetches if PF1 * L > P and P < > effective_cache_size seems like an obvious improvement, but I was not > able to figure out where to make this change. Maybe it belongs into > costsize.c near > run_cost += outer_path_rows * > (inner_path->total_cost - inner_path->startup_cost) * > joininfactor; I've been intending for some time to try to restructure the cost estimator so that repeated indexscans can be costed more accurately. Within the context of the heap-fetch-estimating algorithm, I think the entire execution of a nestloop-with-inner-index-scan could probably be treated as a single scan. I'm not sure how we adjust the estimates for the index-access part, though clearly those are too high as well. This doesn't seem to be a localized change unfortunately. Certainly costsize.c can't do it alone. regards, tom lane