Skip site navigation (1) Skip section navigation (2)

Re: [SQL] Row counts/data changes. Any catalog table that has this info?

From: daq <daq(at)ugyvitelszolgaltato(dot)hu>
To: "David B" <postgresql(at)thegatelys(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [SQL] Row counts/data changes. Any catalog table that has this info?
Date: 2004-02-20 07:44:49
Message-ID: 121164827738.20040220084449@ugyvitelszolgaltato.hu (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-sql
DB> Folks,

DB> Is there a catalog table or location where I can go to find data counts for
DB> tables?

DB> It would be nice if I could do a query which returned something like:

DB> table_name    #Rows
DB> cust          1000
DB> order         5000
DB> order_detail  9500

DB> without having to have the overhead of querying each table in turn.

DB> If there is such a source then is it accurate as of now or last vacuum or
DB> ???

The pg_class table has a reltuples field but only the vacuum process updates it.

DAQ


In response to

pgsql-novice by date

Next:From: Bruno LEVEQUEDate: 2004-02-20 11:13:23
Subject: Re: commenting sql code
Previous:From: Tom LaneDate: 2004-02-20 04:30:41
Subject: Re: psql hangs after "drop table ..."

pgsql-sql by date

Next:From: Sumita BiswasDate: 2004-02-20 08:43:55
Subject: Re: Function
Previous:From: Sumita BiswasDate: 2004-02-20 06:39:18
Subject: Re: Function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group