title: How do I speed up counting rows in a PostgreSQL table?
body: <p>We need to count the number of rows in a PostgreSQL table. In our case, no conditions need to be met, and it would be perfectly acceptable to get a row estimate if that significantly improved query speed.</p>
  <p>Basically, we want <code>select count(id) from &lt;table&gt;</code> to run as fast as possible, even if that implies not getting exact results.</p>