X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BD39252825 for ; Wed, 8 Jun 2005 10:04:20 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 19581-02 for ; Wed, 8 Jun 2005 13:04:16 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by svr1.postgresql.org (Postfix) with ESMTP id 54C6D52896 for ; Wed, 8 Jun 2005 10:04:13 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 40so300852nzk for ; Wed, 08 Jun 2005 06:04:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=QQpb/G8tWuvOBCSTogfCSklHcpPBAo8jQeOS6OlhzD/2xuKbmOM7oqz6UuBKdeC98cDGOBSzpmmY10J1nnGfLHhUZlwtId16ZwmVTwwBvLc7400aDd7EYAJzcKHCneBBzdm/gpkJXAdoHdDGA1utr3+mXVSoAatuA4zpvbW+MAs= Received: by 10.36.105.16 with SMTP id d16mr1288317nzc; Wed, 08 Jun 2005 06:04:17 -0700 (PDT) Received: by 10.36.49.6 with HTTP; Wed, 8 Jun 2005 06:04:17 -0700 (PDT) Message-ID: Date: Wed, 8 Jun 2005 07:04:17 -0600 From: Eduardo Bezerra Reply-To: Eduardo Bezerra To: Alvaro Herrera Subject: Re: btree information Cc: pgsql-admin@postgresql.org In-Reply-To: <20050607195743.GC19846@surnet.cl> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1666_32461245.1118235857256" References: <20050607195743.GC19846@surnet.cl> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.081 tagged_above=0 required=5 tests=HTML_30_40, HTML_MESSAGE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200506/43 X-Sequence-Number: 17798 ------=_Part_1666_32461245.1118235857256 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry, But, where can I find out this utility? Is it pg_dump? 2005/6/7, Alvaro Herrera : >=20 > 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 >=20 > 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. >=20 > 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. >=20 > -- > Alvaro Herrera () > Jude: I wish humans laid eggs > Ringlord: Why would you want humans to lay eggs? > Jude: So I can eat them >=20 --=20 Eduardo Bezerra Valentin Bacharelado em Ci=EAncia da Computa=E7=E3o - DCC - UFAM Laborat=F3rio de VoIP - GRSD - UFAM ------=_Part_1666_32461245.1118235857256 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry,

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

2005/6/7, Alvaro Herrera <alvherr= e@surnet.cl >:
O= n Tue, Jun 07, 2005 at 01:36:56PM -0400, Eduardo Bezerra wrote:
> hi = all,
>  Someone can help me to find these data about btree inde= x:
>   * height;
>  * maximum number of key= s per block
>  * average number of keys per block
>&n= bsp; * number of leaf blocks
>  * average number of le= af blocks per total number of keys
>  * average number of data blocks per total number of key= s

I guess what I'd do is run pg_filedump in an btree index file to f= ind
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 us= ing
pg_filedump too.

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



--
Eduard= o Bezerra Valentin
Bacharelado em Ci=EAncia da Computa=E7=E3o - DCC - UF= AM
Laborat=F3rio de VoIP - GRSD - UFAM ------=_Part_1666_32461245.1118235857256--