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
I'm using pagination_total false on the index collection, which works fine and as expected. However, I'm noticing in the SQL debug logs that when I filter a collection (by user_id), it is still doing a SELECT COUNT(*) FROM (SELECT 1 AS one FROM "large_table" WHERE "large_table"."user_id" = 123 ORDER BY "large_table"."id" desc LIMIT $1 OFFSET $2) subquery_for_count.
Is there a way to disable this for filters? I have an extremely large table and it is causing my app to timeout.
I'm just using the default filter method on my activeadmin model
Expected behavior
Filtering large tables should not run an expensive COUNT(*) or ORDER BY (even if it is using limit and offset)
Actual behavior
Request times out
How to reproduce
Have an extremely large table and filter on an indexed column like user_id. Expect it to be relatively performant and not run things like COUNT(*) unnecessarily.
The text was updated successfully, but these errors were encountered:
Did you find a bug?
I'm using pagination_total false on the index collection, which works fine and as expected. However, I'm noticing in the SQL debug logs that when I filter a collection (by user_id), it is still doing a
SELECT COUNT(*) FROM (SELECT 1 AS one FROM "large_table" WHERE "large_table"."user_id" = 123 ORDER BY "large_table"."id" desc LIMIT $1 OFFSET $2) subquery_for_count
.Is there a way to disable this for filters? I have an extremely large table and it is causing my app to timeout.
I'm just using the default filter method on my activeadmin model
Expected behavior
Filtering large tables should not run an expensive
COUNT(*)
orORDER BY
(even if it is using limit and offset)Actual behavior
Request times out
How to reproduce
Have an extremely large table and filter on an indexed column like user_id. Expect it to be relatively performant and not run things like COUNT(*) unnecessarily.
The text was updated successfully, but these errors were encountered: