WildcardSearch / MentionMe

A plugin for MyBB 1.8.x that allows Twitter-style tagging and integration with MyAlerts
GNU General Public License v3.0
21 stars 9 forks source link

Autocomplete: Recent Thread Participants Query Slow For Larger Forums #215

Closed WildcardSearch closed 6 years ago

WildcardSearch commented 6 years ago

Brought to my attention by @chack1172

Eldenroot commented 6 years ago

@WildcardSearch @chack1172 what about other areas, any way for further optimisation? :)

chack1172 commented 6 years ago

@Eldenroot tomorrow I'll check if there is something to optimize

chack1172 commented 6 years ago

I checked all the queries now and I found nothing to optimize @Eldenroot

WildcardSearch commented 6 years ago

Guys, I'm still short on time, but when I can test this PR, it should be trivial to get 3.2.4 released.

Thanks for all the help!

WildcardSearch commented 6 years ago

I've pulled @chack1172's fix, but talking to a BBO on Discord leads me to believe that we still need to do better. I'm thinking that ORDER BY MAX(p.pid) DESC is the trouble. If the posts table is very large then having to order all posts will be a heavy load on the host.

Maybe I can just use some PHP to sort the results from a less expensive query.

WildcardSearch commented 6 years ago

I think the last commit will make this query much cheaper for big boards. Any testing would be appreciated @chack1172 @Eldenroot