On Mon, 2003-08-25 at 11:08, paul butler wrote:
> From: "Louise Cofield" <lcofield@box-works.com>
> To: <pgsql-novice@postgresql.org>
> Subject: [NOVICE] Number of rows in a table
> Date sent: Mon, 25 Aug 2003 10:06:28 -0600
>
> SELECT count(ColumnName) FROM TableName;
> should do the trick
Well yes, but in most other databases, there is a system table that
stores the approximate number of records in each table, and querying
that system table is a *lot* faster than sequentially reading a 100M
row table.
> > I haven't been able to figure out how to determine the number of
> > populated rows in a table - such as "select max(rownum)" in Oracle.
--
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA
PETA - People Eating Tasty Animals