Getting the exact count of rows in Postgres database Is there any way to get the exact row count of all tables in Postgres in fast way? 

Count(*) seems to run very slowly for larger tables.

Is there a way to get an exact count from Postgres statistics tables without running vacuum, which is also a costly operation?
It seems there is currently no built-in way to do what you require in PostgreSQL.


  People are working toward such capabilities.  While nobody can say
  with any certainty when such features will make it into a
  PostgreSQL release, I think it's safe to predict that it will not
  be before late 2017, and most probably later than that.


Meanwhile, you could manually implement a solution using triggers; for example as described in Postgresql General Bits by A. Elein Mustain.

The idea is to maintain an always-current row count in a separate table using triggers. Be aware that this may add significant overhead to data modifications.