medium10 pts · first answer countsquery-tuningpostgresql
Counting a huge table quickly
A dashboard runs SELECT COUNT(*) FROM events on a 2 billion row PostgreSQL table every minute and each run takes minutes. An approximate number is fine. What is the best option?