A doubt..
Hi all
I looked at B-tree and r-tree implementations. However i could not find
out where it is used. It seems that the data retrieved from the data
base is kept in the tuple data structure. I am not clear in that. please
some one help me..
Thanks
Dhanaraj
"Dhanaraj" <Dhanaraj.M@Sun.COM> wrote
Hi all
I looked at B-tree and r-tree implementations. However i could not find
out where it is used.
The secret is in index_getnext(), which is a general cap for all index
access methods. First it retrieves the correct AM from the pg_am system
catalog:
test=# select amname, amgettuple from pg_am;
AMNAME | AMGETTUPLE
--------+--------------
RTREE | RTGETTUPLE
BTREE | BTGETTUPLE
HASH | HASHGETTUPLE
GIST | GISTGETTUPLE
(4 rows)
Thus, for btree, it will use btgettuple() for the operation ...
It seems that the data retrieved from the data
base is kept in the tuple data structure.
If you mean there is no conversion from disk format to memory format (vice
versa), then yes. Especially you may notice that the algined data items on
the data page are kept aligned in both memory and disk.
Regards,
Qingqing