Rails alone are not enough. Heroku has a nice SQL console with which you can access:
heroku pg:psql YOUR_DB_URL
then you can write this query to get the rank of the entries in the table:
SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC;
If you only need an updated number. lines you can use
SELECT sum(n_live_tup) FROM pg_stat_user_tables;
Please note that you can have both the new db developer plan and the old SHARED one in your config (access to it via heroku pg:info ). You should insert the correct db url, possibly the one that has color.
Allow a 30 minute delay between any sql truncate and Rows to update.
By the way, the web console on http://heroku.com in my case has been updated with the correct number. during my sql queries. Maybe the toolkelt console updates for the hero will be slower.
microspino Oct 03 2018-12-12T00: 00Z
source share