Re: Problem with estimating pages for a table - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Problem with estimating pages for a table
Date
Msg-id 603c8f070905131801o592c2d98o838885800a539607@mail.gmail.com
Whole thread Raw
In response to Problem with estimating pages for a table  (Cristina M <cristina.maier@yahoo.com>)
List pgsql-hackers
On Wed, May 13, 2009 at 6:08 AM, Cristina M <cristina.maier@yahoo.com> wrote:
> Hello,
> I posted to the general list, and didn't receive any replies. Therefore, I
> am trying this list now, hopefully this is the right mailing list for this
> type of questions.
> I am trying to compute the no of pages of a table. I am using the formula :

You haven't given us a lot of information on what you want to do with
this, but if by any chance it's helpful to get the actual number of
pages for some particular table, you can do it like this:

select relpages from pg_class where oid = 'name_of_the_table'::regclass;

There is also a handy function pg_relation_size().

...Robert


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Problem with estimating pages for a table
Next
From: "Dickson S. Guedes"
Date:
Subject: PATCH to fix two little typo in charset.sgml