about summary refs log tree commit diff
path: root/spec/controllers/admin/suspensions_controller_spec.rb
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-10-13 23:53:44 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-10-13 16:53:43 +0200
commita1c54220e8e79c4bb0cc20da193888388efe2ba4 (patch)
tree620c89e19be38f488b49edb0529ea2128bc416c2 /spec/controllers/admin/suspensions_controller_spec.rb
parentdf7dbc41ae08647a02b2171fd1bfce143acec610 (diff)
Optimize Status#permitted_for 500x (account timeline) (#5373)
The main change of this PR is removing `order by visibility` hack.

This was introduced to force using of `index_statuses_on_account_id` instead of PK index, but it seems no longer needed probably due to `index_statuses_on_account_id_id`. Removing this avoids reading all rows, so really improves first fetching of the user who has lot of statuses.

I have also changed JOIN to IN + subquery, which slightly faster in most cases.
Diffstat (limited to 'spec/controllers/admin/suspensions_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions