From: | Pei He <hepeimail(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | mabewlun(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Get the offset of a tuple inside a table |
Date: | 2010-09-22 00:56:09 |
Message-ID: | AANLkTinFS1DMFcGBNubD+WcHUDZBepRaFv_==t5oeCFP@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I doesn't realized postgresql can be such clever.
Another problem I just found is after one tuple is deleted, there will be
some slots unoccupied. The offset cannot be computed even know how much
tuples a page can contain.
I need one hash table.
Thanks
--
Pei
On Tue, Sep 21, 2010 at 8:47 PM, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov
> wrote:
> Pei He wrote:
>
> > The offset is the order of a tuple in a Sequential Scan.
>
> That's not a safe assumption. Try starting a sequential scan against
> a large table on one connection; then before it finishes, start the
> same query on another connection. The second query joins the one
> already in progress and then starts over, "wrapping around".
>
> -Kevin
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-09-22 01:20:06 | Multi-branch committing in git, revisited |
Previous Message | Itagaki Takahiro | 2010-09-22 00:48:12 | Re: trailing whitespace in psql table output |