-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
acts_as_list_class.maximum(position_column) is causing the entire table to lock #264
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This line is causing to load/locking the entire table. It causes the following query:
This is a huge performance issue, if the table is large. We should either remove the temporary position setting or use scope which is attached to acts_as_list for that class.
Maybe we can also add
acts_as_list_class.where(scope_condition)
before callingmaximum
.The text was updated successfully, but these errors were encountered: