Re: How many levels a B-tree has?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Cris" <cris(at)dmcid(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How many levels a B-tree has?
Date: 2003-05-14 16:42:17
Message-ID: 25072.1052930537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Cris" <cris(at)dmcid(dot)net> writes:
> I need to know (if it possible) how many LEVELS a B-tree index
> has (to know how many accesses to the disk it would do in a query).

In CVS tip we keep track of that information in the index's metapage
(page zero). But in so-far-released versions it's not explicitly
tracked anywhere. You'd have to actually chase down the tree from the
root to a leaf to count the levels.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fernando Flores Prior 2003-05-14 16:54:49 Re: - what protocol for an Internet postgres
Previous Message Tom Lane 2003-05-14 16:37:20 Re: - what protocol for an Internet postgres connection