Re: Number of rows in a table

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Number of rows in a table
Дата
Msg-id 1061833284.11922.65.camel@haggis
обсуждение исходный текст
Ответ на Re: Number of rows in a table  ("paul butler" <paul@entropia.co.uk>)
Ответы Re: Number of rows in a table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
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


В списке pgsql-novice по дате отправления:

Предыдущее
От: Tomka Gergely
Дата:
Сообщение: Re: Way to tell what SQL is currently running?
Следующее
От: "Patrick Hatcher"
Дата:
Сообщение: Re: Way to tell what SQL is currently running?