MyBB Community Forums
Very slow database query. - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Very slow database query. (/thread-225772.html)



Very slow database query. - lksmadmin - 2019-12-18

Whenever I load a specific subforum on my forum, it takes 1.5 seconds whereas other parts of the forum only take around 100ms. 

This is the query:

[Image: ytoRjws.png]

What could this be?


RE: Very slow database query. - s3_gunzel - 2019-12-19

Returning north of 220,000 results and then screwing with them might have something to do with it.


RE: Very slow database query. - lksmadmin - 2019-12-19

(2019-12-19, 12:18 AM)Ben Cousins Wrote: Returning north of 220,000 results and then screwing with them might have something to do with it.

Sorry, I don't understand what you mean. How did I screw with them?


RE: Very slow database query. - HLFadmin - 2019-12-19

If you can access your database through a phpMyAdmin connection, open the connection. Without selecting a database or table, you may see a tab for Status. Observe server stats, then locate the Monitor button, select it and wait for charts to fill. You may see CPU utilization, memory usage or swap memory showing poor performance. These may provide clues to resource usage.

Your query with 220K rows is massively larger than my piddly 13K. If all else is equal, and query timing is a proportional thing, my 55ms query time could scale up to 935ms. Maybe you're not that far off.

You can watch the charts in the monitor screen change in real time performing different operations in the forum.

Performance chart, for example.


RE: Very slow database query. - labrocca - 2019-12-19

Do you have any plugins related to stickies?