Re: database row count - Mailing list pgsql-novice

From Carol Cheung
Subject Re: database row count
Date
Msg-id 47A0E8B5.2020404@consumercontact.com
Whole thread Raw
In response to database row count  (Isaac Vetter <ivetter@math.purdue.edu>)
Responses Re: database row count  ("Jonah H. Harris" <jonah.harris@gmail.com>)
List pgsql-novice
On 30/01/2008 15:10, Isaac Vetter wrote the following:
> Dear Pg experts;
>
> I'd like to get a (rough) count of the numbers of rows across all tables
> in a given database.
>
> I understand that I could write a script to run count(*) on each table
> and then sum the counts. Is there an easier way, has someone already
> written this script?
>
> Much Thanks,
>
> Isaac Vetter

How about

SELECT relname, reltuples FROM pg_class WHERE relname IN (...);

pgsql-novice by date:

Previous
From: Isaac Vetter
Date:
Subject: database row count
Next
From: "Jonah H. Harris"
Date:
Subject: Re: database row count