Home > Archive > PostgreSQL Administration > June 2005 > btree information









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author btree information
Eduardo Bezerra

2005-06-07, 1:23 pm

hi all,
Someone can help me to find these data about btree index:
* height;
* maximum number of keys per block
* average number of keys per block
* number of leaf blocks
* average number of leaf blocks per total number of keys
* average number of data blocks per total number of keys

--
Eduardo Bezerra Valentin
Bacharelado em Ciência da Computação - DCC - UFAM
Laboratório de VoIP - GRSD - UFAM

Alvaro Herrera

2005-06-07, 8:24 pm

On Tue, Jun 07, 2005 at 01:36:56PM -0400, Eduardo Bezerra wrote:
> hi all,
> Someone can help me to find these data about btree index:
> * height;
> * maximum number of keys per block
> * average number of keys per block
> * number of leaf blocks
> * average number of leaf blocks per total number of keys
> * average number of data blocks per total number of keys


I guess what I'd do is run pg_filedump in an btree index file to find
out. Leaf pages are marked with the BTP_LEAF flag.

Regarding the number of keys in a block, it's variable, depends on the
size of the keys. You can find out for a particular index using
pg_filedump too.

--
Alvaro Herrera (<alvherre[a]surnet.cl> )
Jude: I wish humans laid eggs
Ringlord: Why would you want humans to lay eggs?
Jude: So I can eat them

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere
" to majordomo@postgresql
.org)

Eduardo Bezerra

2005-06-08, 9:23 am

Sorry,

But, where can I find out this utility? Is it pg_dump?

2005/6/7, Alvaro Herrera <alvherre@surnet.cl>:
>
> On Tue, Jun 07, 2005 at 01:36:56PM -0400, Eduardo Bezerra wrote:
>
> I guess what I'd do is run pg_filedump in an btree index file to find
> out. Leaf pages are marked with the BTP_LEAF flag.
>
> Regarding the number of keys in a block, it's variable, depends on the
> size of the keys. You can find out for a particular index using
> pg_filedump too.
>
> --
> Alvaro Herrera (<alvherre[a]surnet.cl> )
> Jude: I wish humans laid eggs
> Ringlord: Why would you want humans to lay eggs?
> Jude: So I can eat them
>




--
Eduardo Bezerra Valentin
Bacharelado em Ciência da Computação - DCC - UFAM
Laboratório de VoIP - GRSD - UFAM

Alvaro Herrera

2005-06-08, 9:23 am

On Wed, Jun 08, 2005 at 07:04:17AM -0600, Eduardo Bezerra wrote:
> Sorry,
>
> But, where can I find out this utility? Is it pg_dump?


No, see in http://sources.redhat.com/rhdb or thereabouts (maybe
http://sources.redhat.com/RHDB even, not sure)

--
Alvaro Herrera (<alvherre[a]surnet.cl> )
"Puedes vivir solo una vez, pero si lo haces bien, una vez es suficiente"

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com