MyBB Community Forums

Full Version: Thread prefixes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
If you have 1000 different prefixes I think you need to reassess how you're using it.
No, i just have 15 different prefixes.
(2011-06-02, 09:21 PM)Wiz01 Wrote: [ -> ]No, i just have 15 different prefixes.

Then you were talking about the amount of threads with a prefix here?
(2011-06-02, 07:44 AM)Wiz01 Wrote: [ -> ]I think, there's more than 30000 on my site.

15 prefixes is not really going to do too much damage to performance. Have you tried the query I've suggested? Do you see any significant improvements in the performance? If not, it's not the prefixes that is causing performance issues.
(2011-06-02, 09:37 PM)Aries-Belgium Wrote: [ -> ]Then you were talking about the amount of threads with a prefix here?

Yes and i have not tried the code edit yet.
(2011-06-02, 08:10 AM)Aries-Belgium Wrote: [ -> ]You can do a temporary core edit. In forumdisplay.php search for:
	$query = $db->query("
		SELECT t.*, p.displaystyle AS threadprefix, {$ratingadd}{$select_rating_user}t.username AS threadusername, u.username
		FROM ".TABLE_PREFIX."threads t
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid){$select_voting}
		LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid = t.prefix)
		WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2
		GROUP BY t.tid
		ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield2
		LIMIT $start, $perpage
	");
And replace with:
	$query = $db->query("
		SELECT t.*, {$ratingadd}{$select_rating_user}t.username AS threadusername, u.username
		FROM ".TABLE_PREFIX."threads t
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid){$select_voting}
		WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2
		GROUP BY t.tid
		ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield2
		LIMIT $start, $perpage
	");

This will only disable the prefixes in the forum display page.
Change it back to the original once you tested it.

I need to test this again, but the forumdisplay.php is changed in 1.6.4.
Help please!
I think 1.6.4 has performance improvements in this area, is it performing better since you've upgraded?
Well, the board is faster but it's still uses too much resources.
Thread prefixes aren't even queried anymore so they won't be having any impact on performance.
Ok, thank you!
how can i edit the prefixes?
Pages: 1 2