From: | Pei He <hepeimail(at)gmail(dot)com> |
---|---|
To: | Szymon Guz <mabewlun(at)gmail(dot)com>, Kevin(dot)Grittner(at)wicourts(dot)gov |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Get the offset of a tuple inside a table |
Date: | 2010-09-22 00:37:42 |
Message-ID: | AANLkTinzKoTUKEJhYgOSPjuamxKNwcz+mJzOu2Z4x3cx@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Szymon, Kevin,
The offset is the order of a tuple in a Sequential Scan.
What I want to do is, for a given key return the tuples that Index scan can
find, and return the rest tuples by a seq scan. So, I need to know which
tuples have been returned by maintain a bitmap, and to avoid return the same
tuple twice.
If I can know the offset of a tuple in the order of file scan, then I can
force the seq scan to skip it.
By ctid, can I know how much tuples are in a block, is it an constant?
I think a more general solution would be build a hash table on ctid.
What do you think?
Thanks
--
Pei
On Tue, Sep 21, 2010 at 5:44 PM, Szymon Guz <mabewlun(at)gmail(dot)com> wrote:
>
>
> On 21 September 2010 23:02, Pei He <hepeimail(at)gmail(dot)com> wrote:
>
>> Hi,
>> When I using an index scan, can I get the offset of the tuple in the
>> table?
>>
>> Thanks
>> --
>> Pei
>>
>
> What do you mean by "the offset in the table"?
>
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-09-22 00:47:02 | Re: Get the offset of a tuple inside a table |
Previous Message | Joshua D. Drake | 2010-09-22 00:25:47 | Re: Configuring synchronous replication |