conn = ActiveRecord::Base.connection
conn.select_all('show tables').rows.flatten.
map {|table| [table, conn.select_all("select count(1) from #{table}").rows.flatten.first] }.
sort_by {|_, c| -c }.
take(10)
conn = ActiveRecord::Base.connection
conn.select_all('show tables').rows.flatten.
map {|table| [table, conn.select_all("select count(1) from #{table}").rows.flatten.first] }.
sort_by {|_, c| -c }.
take(10)