MyBB Community Forums

Full Version: At what point should I take out all unnecessary SQL Queries?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At what point should I take out all unnecessary SQL Queries? 50,000 posts? 100,000 posts? etc.

Example:
<a href="{$mybb->settings['bburl']}/index.php">
could easily become
<a href="/forum/index.php">

That sort of thing is all thru the templates.

Right now I'm at 65,000 posts:
Generated in 0.3861189 seconds (81.90% PHP / 18.10% MySQL)
SQL Queries: 95 / Global Parsing Time: 0.0733469 / Memory Usage: 8.5 MB
PHP version: 5.2.14 / Server Load: 0.3 / GZip Compression: Disabled

Just want to get people's opinions. Thanks Smile
Changing the link type won't help you relieving any query load I believe. What other things you're asking about?
$mybb is a reusable object, it is only loaded once.

MyBB doesn't even load settings from the database, the settings are cached in ./inc/settings.php

The reason you have so many queries is because of plugins.

that is not a query, that is a setting that is loaded into memory after reading a static file.

the biggest performance hit seems to be when it comes to forum jump if you have a lot of forums, usergroup permissions where there are a lot of groups and specific permissions for each and plugins that are inefficient or unneeded (e.g. only make template edits that are better made directly)
Thanks everyone!