Re: Postgres code for a query intermediate dataset

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)com>
Cc: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres code for a query intermediate dataset
Date: 2014-09-15 16:41:25
Message-ID: CA+TgmoY7_4aK9oaVn+z2FZP_OnNk1w=VL8HjKAPCyPQESPuJkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 14, 2014 at 5:18 AM, Rohit Goyal <rhtgyl(dot)87(at)gmail(dot)com> wrote:
> 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.

You may want to look at index_getnext(), index_getnext_tid(), and/or
heap_hot_search_buffer().

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-09-15 17:08:28 Re: jsonb contains behaviour weirdness
Previous Message Robert Haas 2014-09-15 16:37:33 Re: pgbench throttling latency limit