I keep getting emails that state the following:
“[Your database X] contains 16,919 rows, exceeding the plan limit of 10,000. INSERT privileges to the database will be automatically revoked in 7 days. This will cause service failures in most applications dependent on this database.”
Even though I have limited the number of rows in my single table application to max 10 000, usually hovering at 9999.
I have checked the number of rows and the number of tables by psql and PGAdmin3.
Any idea how Heroku counts the number of rows in a database? Is this a platform bug or am I missing something?
Right now it makes estimated counts until you reach a certain threshold at which point it performs accurate counts (this mechanism subject to change). It will never revoke access or email a user without doing an accurate count first (
SELECT count(*) FROM table1+SELECT count(*) FROM table2etc).It does not count system tables; it considers all user level tables. Oftentimes people don’t realize they have tables that are eating up rows, such as
sessions,eventsorlogs.