Description of problem: Due to recent changes in the stored function FlagList(), it has become slow to return results when including the column in buglist.cgi. The changes were due to the flags.is_active columns no longer present in 3.2 schema. Need to determine where the performance hit is coming from in the stored function code. rh_bugzilla_3: redhat/bugs-functions.mysql
Created attachment 298957 [details] Patch to speed up FlagList() stored function some (v1) This simplification seems somewhat faster to me than what is there currently. I am passing in only the bug id and user id to the function. The function is then looking up the group_ids for the user in a sub select instead of creating a temporary table. Alot of the slowdown with the current implementation seems to be coming from blocking while trying to create the tmpGroupIds temp table. Alleviating that need seems to speed it up some although it is not as fast as it could be. Tony please have a look at the change and let me know what you think. Dave
Created attachment 299092 [details] Patch to speed up FlagList() stored function some (v2) Updated patch. Enabled inclusion of attachment flags in the flag list if the flagged attachment is either not private or the user is in the insider group which allows them to see the attachment. Tony, please take a look. I have this change running on https://bugdev.devel.redhat.com/bugzilla if you want to try it out against the snapshot database. Thanks
Dave, This new sql fucntion looks good. I have tested it against a test database and it works fine. By the way, I don't have a sudo permission to access bz-web1-test.devel. Can you set set it up for me please? Thanks, Tony
Thanks Tony. Changing to MODIFIED.