Search Postgresql Archives

Re: Number of rows of a table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Oct 19, 2005, at 2:29 , vittorio wrote:

Using psql how can I ask postgresql to show the actual number of rows of a
table?

For table foo,

select count(*) from foo;

An up-to-date count of the number of actual rows is not stored some place in the database. If an estimate is adequate for your purposes, you might want to look at some of the system tables which track row counts for query planning strategy. I don't recall offhand which column of which system table you'd want to look at, unfortunately.

Michael Glaesemann
grzm myrealbox com




---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux