From: | Tore Halvorsen <tore(dot)halvorsen(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Getting all entries in a single block with ctid |
Date: | 2012-01-16 16:15:03 |
Message-ID: | CADGw-SdmWXyHMhDn30wR7jB1dMAMB=C4S5P6Ninb93Jja4dviA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Jan 16, 2012 at 4:08 PM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> The only other solution is to check all possible items on the page. There
> may be up to 291 items (although it depends on block size and
> architecture, see MaxHeapTuplesPerPage in access/htup.h).
>
> Nice to know.
> Something like this should work
>
> ctid = '(123,0)'::tid OR ctid = '(123,1)'::tid OR ctid = '(123,2)'::tid
> OR ... OR ctid = '(123,290)'::tid
>
Yeah, that works, but it's kinda impractical... I'm mostly trying to figure
out how fragmented a table is,
by checking how must the blocks are shared - so that the worst one can be
scheduled for clustering...
> But maybe someone will recommend a better solution.
>
Hopefully - thanks anyway :)
--
Eld på åren og sol på eng gjer mannen fegen og fjåg. [Jøtul]
<demo> 2012 Tore Halvorsen || +052 0553034554
From | Date | Subject | |
---|---|---|---|
Next Message | Evert Koks | 2012-01-16 16:15:18 | postgres Windows distribution - openssl support |
Previous Message | Adrian Klaver | 2012-01-16 15:52:06 | Re: time zone problem |