how to extract the page "address" from the ctid - Mailing list pgsql-general

From Marc Mamin
Subject how to extract the page "address" from the ctid
Date
Msg-id B6F6FD62F2624C4C9916AC0175D56D8828BEBD0E@jenmbs01.ad.intershop.net
Whole thread Raw
Responses Re: how to extract the page "address" from the ctid  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
Hello,

while waiting for the new BRIN and improved GIN Indexes :-)

I'd like to get a rough feeling, how some column's values are distributed on the internal pages.

e.g.:

SELECT c, count(*) FROM
(
       SELECT substring(ctid::text, '^.([^,]+)'),
        count(distinct myColumn) as c
        FROM myTable
        GROUP BY substring(ctid::text, '^.([^,]+)')
)foo
GROUP BY c order by 1 desc;


Is there a quicker way to extract the page reference from the ctid?

regards,

Marc Mamin



pgsql-general by date:

Previous
From: Leonard Boyce
Date:
Subject: Hardware question
Next
From: Jimit Amin
Date:
Subject: PgPool Configuration Document required