Query is being called in loop – that creates thread locking
-
The query is being called in loop – that creates thread locking and plugin could be running in a loop.
Here I have checked in detail that the following query running 12 times per second – can we optimize this query?
query called in loop almost 12 times:
SELECT object_id AS id, object_type AS objectType, from_date AS fromDate, to_date AS toDate
FROM ajoupb3as_uam_accessgroup_to_object
WHERE group_id = ’45’
AND group_type = ‘UserGroup’
AND object_id != ”
AND (general_object_type = ‘_post_’ OR object_type = ‘_post_’) AND (from_date IS NULL OR from_date <= ‘2020-04-16 11:28:29’) AND (to_date IS NULL OR to_date >= ‘2020-04-16 11:28:29’)above query is from called from wp-content/plugins/user-access-manager/src/UserGroup/AbstractUserGroup.php
and this function called from the following files:
wp-content/plugins/user-access-manager/src/ObjectMembership/ObjectMembershipHandler.php line: 152
wp-content/plugins/user-access-manager/src/ObjectMembership/UserMembershipHandler.php line: 110
wp-content/plugins/user-access-manager/src/UserGroup/AbstractUserGroup.php line: 420, 565
Can we optimize it? We also want to know its impact on other functionality.
- The topic ‘Query is being called in loop – that creates thread locking’ is closed to new replies.