Re: table row count - Mailing list pgsql-general

From Tom Lane
Subject Re: table row count
Date
Msg-id 23885.1044771105@sss.pgh.pa.us
Whole thread Raw
In response to table row count  ("Martin Hurst" <martinh@ix.netcom.com>)
List pgsql-general
"Martin Hurst" <martinh@ix.netcom.com> writes:
> Is there a way to get the row count of a user table without doing the?
> select count(*) from <table>

If this were an easy problem, count() would do it for you ;-)

If you're willing to settle for an approximate answer,
pg_class.reltuples might do.  It's the row count as of the last VACUUM.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: table row count
Next
From: Marcelo Pereira
Date:
Subject: PostgreSQL x Oracle