Re: Problem with estimating pages for a table

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: cristina(dot)maier(at)yahoo(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem with estimating pages for a table
Date: 2009-05-14 01:01:46
Message-ID: 603c8f070905131801o592c2d98o838885800a539607@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 13, 2009 at 6:08 AM, Cristina M <cristina(dot)maier(at)yahoo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dickson S. Guedes 2009-05-14 03:38:05 PATCH to fix two little typo in charset.sgml
Previous Message Alvaro Herrera 2009-05-13 22:56:07 Re: Problem with estimating pages for a table