Modify forum roles query for Aurora performance.
This is a fix for the performance issues in EDUCATOR-3374 AWS's Aurora backend for MySQL selects the wrong index on the django_comment_client_role_users table, leading to performance issues. This commit replaces that join with individual requests for permissions for each role (of which there may be several for any given user). It's dumber SQL, but Aurora will do the right thing.
This commit is contained in:
@@ -406,7 +406,7 @@ class TestXBlockQueryLoad(SharedModuleStoreTestCase):
|
||||
# * django_comment_client_role
|
||||
# * django_comment_client_permission
|
||||
# * lms_xblock_xblockasidesconfig
|
||||
num_queries = 3
|
||||
num_queries = 2
|
||||
for discussion in discussions:
|
||||
discussion_xblock = get_module_for_descriptor_internal(
|
||||
user=user,
|
||||
|
||||
Reference in New Issue
Block a user