agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Pei Cao <pc%cs.Princeton.EDU@Princeton.EDU>
To: postgres@postgres.Berkeley.EDU
Subject: how are key values stored in a B-tree index files?
Date: Wed, 31 Aug 1994 23:56:08 -0400
Message-ID: <9409010356.AA04017@cs> (raw)

Hi, I am trying to figure out how the B-tree index file works.  I have a
relation with a non-clustered unique integer key, and I built a B-tree index
on it.  I'd like to figure out from the index files what disk pages/blocks 
have tuples whose key values are between, say, 500 and 600.  

So I used "pagedoc -b -d2 index" to dump the index file contents.
The problem is, it seems that each IndexTupleData only has the tid of the 
corresponding heap tuple, but no key value of this heap tuple.  So how does a 
search for a tuple with a particular key work?  

I don't even see the key values on internal pages, so how does a search know
which direction to go down the b-tree?

Thanks a lot!

Pei Cao
Grad. Student, CS Dept.
Princeton University

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: pc%cs.Princeton.EDU@Princeton.EDU
  Subject: Re: how are key values stored in a B-tree index files?
  In-Reply-To: <9409010356.AA04017@cs>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox