You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, while that option changes the display of the pagination, it does not actually prevent the COUNT (*) from "table" from occurring. This one line was causing us sometimes up to a second of page load time for some of our large tables.
I instrumented it to be notified when a count (*) was issued, via:
ActiveSupport::Notifications.subscribe("sql.active_record")do |_,_,_,_,details|
ifdetails[:sql] =~ /SELECT COUNT\(\*\) FROM "messages"/putscaller.join("\n")puts"*" * 50endend
Then I loaded up our /admin/messages table, and sure enough, the count happened:
The documentation says:
However, while that option changes the display of the pagination, it does not actually prevent the
COUNT (*) from "table"
from occurring. This one line was causing us sometimes up to a second of page load time for some of our large tables.I instrumented it to be notified when a
count (*)
was issued, via:Then I loaded up our
/admin/messages
table, and sure enough, the count happened:The text was updated successfully, but these errors were encountered: