Bugfix
Member
Hello!
With a big installation the deletion of a user takes about 10sec.
We found the problem within 3 tables and optimized it with 3 indexes:
We added these 3 indexes:
Now, the deletion takes about 1sec.
Maybe this helps someone for optimisation!
regards H.
With a big installation the deletion of a user takes about 10sec.
We found the problem within 3 tables and optimized it with 3 indexes:
Code:
5,8 sec.: UPDATE IGNORE xf_conversation_master SET last_message_user_id = 0,last_message_username = 'deletedusername' WHERE last_message_user_id = ?
3,5 Sec.: UPDATE IGNORE xf_conversation_user SET last_message_user_id = 0,last_message_username = 'deletedusername' WHERE last_message_user_id = ?
1,5 Sec.: UPDATE IGNORE xengallery_comment SET user_id = 0,username = 'deletedusername' WHERE user_id = ?
We added these 3 indexes:
Code:
ALTER TABLE `xf_conversation_master` ADD INDEX ( `last_message_user_id` );
ALTER TABLE `xf_conversation_user` ADD INDEX ( `last_message_user_id` );
ALTER TABLE `xengallery_comment` ADD INDEX ( `user_id` );
Now, the deletion takes about 1sec.
Maybe this helps someone for optimisation!
regards H.
Upvote
0