Re: Postgres code for a query intermediate dataset

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres code for a query intermediate dataset
Date: 2014-09-14 09:57:51
Message-ID: 5415669F.2030506@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14/09/14 21:18, Rohit Goyal wrote:
> Hi Mark & Atri, :)
>
> Thanks for reply. But, I think i confused you. I am talking about access
> using indexes. So, I assume that B+ tree store key-value pair where
> rohit is the key and all the versions are its value.
>
> Another way to think is I have a secondary index on emp. name and there
> are 4 rohit exist in DB. So, now B+ tree gives me 4 different tuple
> pointer for each Rohit. I want to know the code portion for this where i
> can see all 4 tuple pointer before each one have I/O access to fetch its
> tuple.
>
> Are the suggestions still valid?
>

Visibility rules mentioned earlier apply equally to tables and indexes
(strictly speaking what happens is index tuples are checked against the
relevant tables to see if your session can see them), so discussion of
whether tuples are retrieved via index or table scans is not really
relevant (i.e query planning/optimization is separate from tuple
visibility).

Cheers

Mark

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2014-09-14 14:12:22 Re: Aussie timezone database changes incoming
Previous Message Rohit Goyal 2014-09-14 09:18:51 Re: Postgres code for a query intermediate dataset