Re: Doubt in IndexScanDescData

From: Suresh <suiyengar(at)yahoo(dot)com>
To: Hans-Juergen Schoenig <postgres(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doubt in IndexScanDescData
Date: 2008-02-17 16:13:56
Message-ID: 343885.48284.qm@web54505.mail.re2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hans-Juergen Schoenig <postgres(at)cybertec(dot)at> wrote:
On Feb 17, 2008, at 4:33 PM, Suresh wrote:

[ "include/access/relscan.h" ]

In IndexScanDescData, whats the purpose of having two Relation variables.

typedef struct IndexScanDescData
{
Relation heapRelation; /* heap relation descriptor, or NULL */
Relation indexRelation; /* index relation descriptor */
....
...
}IndexScanDescData;

The index does not contain the entire tuple. If you index column A the index will not contain values in column B of the same table.
Thus, if you find a record in the index one of the things which have to be done is to get the record from disk to check visibility and other columns.

Yes thats correct. But I still dont get it. To get record from the disk on match, we need Relation data. But whats the purpose having two seperate Relation variables ?

Does it mean that heaprelation will contain only info about that particular column of the table and index relation will have info about the whole tuple of the relation ?

best regards,

hans-juergen schoenig

--
Cybertec Schönig & Schönig GmbH
PostgreSQL Solutions and Support
Gröhrmühlgasse 26, 2700 Wiener Neustadt
Tel: +43/1/205 10 35 / 340
www.postgresql.at, www.cybertec.at


---------------------------------
Never miss a thing. Make Yahoo your homepage.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Juergen Schoenig 2008-02-17 16:22:57 Re: Doubt in IndexScanDescData
Previous Message Hans-Juergen Schoenig 2008-02-17 15:56:53 Re: Doubt in IndexScanDescData