X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D845C475458 for ; Thu, 24 Apr 2003 19:58:29 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 2874D474E42 for ; Thu, 24 Apr 2003 19:58:29 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3ONwUU6003661; Thu, 24 Apr 2003 19:58:31 -0400 (EDT) To: jim@nasby.net Cc: pgsql-performance@postgresql.org Subject: Re: More tablescanning fun In-reply-to: <20030424183817.A66185@flake.decibel.org> References: <20030424183817.A66185@flake.decibel.org> Comments: In-reply-to "Jim C. Nasby" message dated "Thu, 24 Apr 2003 18:38:17 -0500" Date: Thu, 24 Apr 2003 19:58:30 -0400 Message-ID: <3660.1051228710@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.3 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/204 X-Sequence-Number: 1710 "Jim C. Nasby" writes: > It seems like the metrics used for the cost of index scanning v. table > scanning on large tables need to be revisited. It might be such a huge > difference in this case because the table is essentially clustered on > the primary key. Probably. What does the correlation figure in pg_stats show as? There's been some previous debate about the equation used to correct for correlation, which is certainly bogus (I picked it more or less out of the air ;-)). But so far no one has proposed a replacement equation with any better foundation ... take a look in src/backend/optimizer/path/costsize.c if you want to get involved. > Also, is there a TODO to impliment > real clustered indexes? No. It's not apparent to me how you could do that without abandoning MVCC, which we're not likely to do. regards, tom lane