PostgreSQL pgAdmin – View Exact Row Count of a Table

pgadminpostgresql

Where can I see the exact row count of a table in pgAdmin III?

I know where to find the approximate row count:

enter image description here

I am also aware I can SELECT COUNT(*) FROM my_table. But I want to know whether the exact row count can be found somewhere in pgAdmin III's GUI, in the same way we can query the top 100 rows.

enter image description here

Best Answer

Two lines below the estimate you highlighted we can see:

Rows (counted)  not counted

Right-click and choose Count from the context-menu to get the current count right there. Be aware that the count is only accurate in the moment it is taken.
pgAdmin does not count rows in big tables (because that can be expensive) unless it's told to do so. There is a setting in the Options:

Count rows if estimated less than [2000]

Replace the default 2000 if you want a different limit. Details in the manual here:

http://www.pgadmin.org/docs/1.20/options-browser.html