Support Forum

'Add Member' under 'User Groups' is super slow and it will slow down whole forum – almost unusable

TB Travis Bader
Travis Bader
Member

This has been an issue forever. We’ve been updated simple press to the latest version, issue still exist!

The problem is that every time we want to assign a user into certain group (Moderators for example), we would just click on ‘Add Member’ and it will show a form with a list of user we can chose from. Initially, it works fine, but as number of users grow, it become slower and slower. Now we just simply cannot assign any Moderator because of that. What’s worse,  it will slow down the whole forum every time we click on ‘Add Member’

It is very frustrating. We have only 13000 users, it is quite small compare to some other forum out there. The ‘Show/Hide members’ works fine and it respond fast, we don’t know why ‘Add Member’ behave so differently. We are desperately need this to be fixed! frownfrownfrown

Thank You 

4 Answers

New Answer

MP Mr Papa
Mr Papa
Member

Thus far, only on your site…  If you look, it only displays 100 users at a time… doesnt matter how many users you have…  we have users with hundreds of thousands of users that can use that just fine…  show members, on the other hand, must fetch the entire users list to display it… in testing, it is much, much slower than the add members…

so a bit confused what might be going on locally for you…

TB Travis Bader
Travis Bader
Member

Below is our mysql log

# Query_time: 39.837212  Lock_time: 0.012969 Rows_sent: 0  Rows_examined: 20083897

SET timestamp=1339471346;

SELECT wp_sfmembers.user_id, display_name, admin

                                FROM wp_sfmembers

                                WHERE user_id NOT IN (SELECT user_id FROM wp_sfmemberships WHERE usergroup_id=3) AND admin=0

                                ORDER BY display_name

                                LIMIT 0,100;

whenever click ‘Add Member’ the above query is performed, it is just not return anything and mysql starts to spike CPU to 100%, and it happens to both my local machine (mac osx) and the host (slicehost)confused

TB Travis Bader
Travis Bader
Member

ok I’m responding to my own post. We found that NOT IN requires index for user_id in wp_sfmemberships table.

For some reason Simple:Press did not create index for user_id column in wp_sfmemberships properly, which cause the query taking forever.

We manually adding index for user_id in wp_sfmemberships, now it only take a second.

MP Mr Papa
Mr Papa
Member

that’s more like everyone elses experience…  odd that there is not an index on user_id in sfmemberships… its in the install (and upgrade script)…  and of course, expected…

so good job hunting that down…