Re: RFC: planner statistics in 7.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RFC: planner statistics in 7.2
Дата
Msg-id 23742.987729281@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: RFC: planner statistics in 7.2  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: RFC: planner statistics in 7.2  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Hulands
Дата:
Сообщение: Including libpq++.h
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Including libpq++.h