Re: RFC: planner statistics in 7.2

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: RFC: planner statistics in 7.2
Дата
Msg-id 3.0.5.32.20010420110254.021fe100@mail.rhyme.com.au
обсуждение исходный текст
Ответ на Re: RFC: planner statistics in 7.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: RFC: planner statistics in 7.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 20:48 19/04/01 -0400, Tom Lane wrote:
>
>> This sounds great; can the same be done for clustering. ie. pick a random
>> sample of index nodes, look at the record pointers and so determine how
>> well clustered the table is?
>
>My intention was to use the same tuples sampled for the data histograms
>to estimate how well sorted the data is.  However it's not immediately
>clear that that'll give a trustworthy estimate; I'm still studying it ...

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.


>
>>     ALTER STATISTICS FOR tab[.column] COLLECT n
>>     ALTER STATISTICS FOR tab SAMPLE m
>
>Is that more standard than the other syntax?
>

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


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: RFC: planner statistics in 7.2
Следующее
От: Greg Hulands
Дата:
Сообщение: Including libpq++.h