MyBB Community Forums

Full Version: My Index Page Loads Significantly Slower Than Rest of Site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm unsure if it's a host issue but I feel like if it was then I'd have slow loading speeds throughout the whole site however it's the index page that's significantly slower than the rest of the site.

I thought maybe because my index page has the most modification to it, that may be causing slower speeds but I tried switching to the Default MyBB theme without modifications and the index still loads incredibly slow.

Any idea what's going on here?

My site: https://sharree.com
Have you looked at the debug info? As an admin you can add ?debug=1 to any url and it will pop up all the information like how many queries the page used, how long each of the queries took, you'd also see how much is PHP processing time.
Yes, please review the debug page and share any piece of it that you think might be useful for us to assist you.
(2021-02-18, 03:24 PM)dragonexpert Wrote: [ -> ]Have you looked at the debug info? As an admin you can add ?debug=1 to any url and it will pop up all the information like how many queries the page used, how long each of the queries took, you'd also see how much is PHP processing time.

(2021-02-18, 07:14 PM)Omar G. Wrote: [ -> ]Yes, please review the debug page and share any piece of it that you think might be useful for us to assist you.

Thanks wasn't aware of the debug page. I managed to find 2 plugins that were causing the slow speed but there is just 1 Query remaining but I can't quite figure out how to reduce the load speed for this. (I use my forumdisplay as my index)

#30 - Select Query
SELECT t.*, (t.totalratings/t.numratings) AS averagerating, t.username AS threadusername, u.username FROM mybb_threads t LEFT JOIN mybb_users u ON (u.uid = t.uid) WHERE t.fid='67' AND (t.visible IN (1,-1,0)) ORDER BY t.sticky DESC, t.lastpost desc LIMIT 0, 21
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
t	ref	fid	fid	2	const	347730	Using index condition; Using where; Using filesort
u	eq_ref	PRIMARY	PRIMARY	4	sharree.t.uid	1	
Query Time: 1.49 seconds

https://i.gyazo.com/fbac9af26ddaab9bcc87...5132b8.png
Hi, do you use your forum display page as your forum index? Is thread ratings a feature you use in such forum?
If you disable thread ratings in that forum it might not perform that query. I would try that and see if it works.

@Omar: I think they are using .htaccess to have the index be forumdisplay.php?fid=2
Yes, at first I thought about indexes, but I don't think there is any index that could help for that specific query. I might be wrong though.
(2021-02-19, 02:35 AM)Omar G. Wrote: [ -> ]Hi, do you use your forum display page as your forum index? Is thread ratings a feature you use in such forum?

(2021-02-19, 02:35 AM)dragonexpert Wrote: [ -> ]If you disable thread ratings in that forum it might not perform that query. I would try that and see if it works.

@Omar: I think they are using .htaccess to have the index be forumdisplay.php?fid=2

Ya so I'm using my forumdisplay (67) as my index through .htaccess.

So I disabled thread ratings but that didn't make much of a reduction.

Also I realized this other query that's causing 1.5 seconds query time
#26 - Select Query
SELECT COUNT(tid) AS threads FROM mybb_threads WHERE fid = '67' AND visible IN (1,-1,0)
Table	Type	Possible Keys	Key	Key Length	Ref	Rows	Extra
mybb_threads	ref	fid	fid	2	const	347733	Using index condition
Query Time: 1.537 seconds

https://i.gyazo.com/52764b9ae2ccc3ba2383...baf478.png


This Forum ID has 300,000+ threads, can too many threads have an affect on loading the forumdisplay? Also there are NO issues loading the showthreads in that forum.
Ok, so it seems the issue is indeed the threads table (I think), but I can't think of an index that would help in that table.

Lets wait to see if somebody else comes with an idea.
That query comes from pagination. There is no way to disable this without a core edit. I'm kind of wondering if the fact that the column visible isn't a key is causing a large table scan because I noticed in your screenshot for thread ratings it said "using where" in the column marked extra. For this query it is not displaying that. This would obviously take significant time to build an index on that column given the table size.

Edit: didn't realize the key "fid" contains multiple columns. I use Innodb and it shows the using where.
Pages: 1 2