Re: RFC: planner statistics in 7.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: RFC: planner statistics in 7.2
Date: 2001-04-20 01:14:41
Message-ID: 23742.987729281@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> I'm not sure you want to know how well sorted it is in general, but you do
> want to know the expected cost in IOs of reading all records from a given
> index node, so you can more accurately estimate indexscan costs. AFAICS it
> does not require that the entire table be sorted. So checking the pointers
> on the index nodes gives an idea of clustering.

But you don't really need to look at the index (if it even exists
at the time you do the ANALYZE). The extent to which the data is
ordered in the table is a property of the table, not the index.
I'd prefer to get the stat just from the table and not have to do
additional I/O to examine the indexes.

But, as I said, I'm still reading the literature about estimation
methods for indexscans. It may turn out that a statistic calculated
this way isn't the right thing to use, or isn't trustworthy when taken
over a small sample.

>> Is that more standard than the other syntax?

> Not at all. It just avoids messing with one of the standard statements.

Oh, so you're deliberately not being standard. I see. Probably a
reasonable point.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-04-20 01:19:11 Re: Including libpq++.h
Previous Message Greg Hulands 2001-04-20 01:09:36 Including libpq++.h