3

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

7

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.