Обсуждение: how to get the height of index tree?

Поиск
Список
Период
Сортировка

how to get the height of index tree?

От
sunpeng
Дата:
Hi, how to get the height of R* or B tree of created index ?

Re: how to get the height of index tree?

От
sunpeng
Дата:
  what's the base of loga(n) function ? is that base a=16? or something else? how to know this base ?

2010/10/22 sunpeng <bluevaley@gmail.com>
Hi, how to get the height of R* or B tree of created index ?

Re: how to get the height of index tree?

От
John R Pierce
Дата:
On 10/22/10 11:50 AM, sunpeng wrote:
>   what's the base of log_/a/ (/n/) function ? is that base a=16? or
> something else? how to know this base ?
>
> 2010/10/22 sunpeng <bluevaley@gmail.com <mailto:bluevaley@gmail.com>>
>
>     Hi, how to get the height of R* or B tree of created index ?
>
>


it would be based on how many index values plus overhead fits in each 8K
block.   highly variable if the field being indexed is TEXT or VARCHAR
or similar.



Re: how to get the height of index tree?

От
Dimitri Fontaine
Дата:
John R Pierce <pierce@hogranch.com> writes:
>> 2010/10/22 sunpeng <bluevaley@gmail.com <mailto:bluevaley@gmail.com>>
>>
>>     Hi, how to get the height of R* or B tree of created index ?

You could use Gevel for GiST and GIN:

  http://www.sai.msu.su/~megera/wiki/Gevel

Don't know if something similar exists for btree, but I guess it would
be very useful.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support