pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jim@nasby.net
Cc: pgsql-performance@postgresql.org
Subject: Re: More tablescanning fun
Date: Thu, 24 Apr 2003 19:58:30 -0400
Message-ID: <3660.1051228710@sss.pgh.pa.us> (raw)
In-Reply-To: <20030424183817.A66185@flake.decibel.org>
References: <20030424183817.A66185@flake.decibel.org>

"Jim C. Nasby" <jim@nasby.net> 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




view thread (11+ messages)  latest in thread

Message-ID: <3660.1051228710@sss.pgh.pa.us>
Permalink:  ../3660.1051228710@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3660.1051228710@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jim@nasby.net
  Subject: Re: More tablescanning fun
  In-Reply-To: <3660.1051228710@sss.pgh.pa.us>
  References: <20030424183817.A66185@flake.decibel.org> <3660.1051228710@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox