2013-02-11, 06:49 PM
Hi. I'm new to MyBB and I was wondering why there are a lot of queries while simply watching a thread in my forum(SQL Queries: 19).
So I looked at "MyBB Debug Information", and I saw this:
SELECT * FROM MyBB_threads WHERE tid='1'
then after that this:
SELECT fid FROM MyBB_threads WHERE tid = '1' LIMIT 1
Didn't we gather the info in the first query? So why make a new one...
I have MyBB version 1.6.9.
Also this:
SELECT COUNT(*) AS replies FROM MyBB_posts p WHERE p.tid='1' AND (p.visible='0' OR p.visible='1')
It would be best to create a column for that in MyBB_threads table.
And you can add to MyBB_datacache table the information you take from:
SELECT name, tid, properties, stylesheets FROM MyBB_themes WHERE tid='3' LIMIT 1
Basically I want MyBB to make less queries so that the execution time will be shortened.
EDIT: Oh and one more suggestion is to be able to use templates via files instead of the database.
Like any other forum software. But to do that you would need to create database template to file template generator which would be kinda a bit difficult to make.
The reason for this is cause I heared somewhere in the past, don't remember where that the templates via files method is faster.
Thanks. I hope I didn't ask something newbie or whatever.
So I looked at "MyBB Debug Information", and I saw this:
SELECT * FROM MyBB_threads WHERE tid='1'
then after that this:
SELECT fid FROM MyBB_threads WHERE tid = '1' LIMIT 1
Didn't we gather the info in the first query? So why make a new one...
I have MyBB version 1.6.9.
Also this:
SELECT COUNT(*) AS replies FROM MyBB_posts p WHERE p.tid='1' AND (p.visible='0' OR p.visible='1')
It would be best to create a column for that in MyBB_threads table.
And you can add to MyBB_datacache table the information you take from:
SELECT name, tid, properties, stylesheets FROM MyBB_themes WHERE tid='3' LIMIT 1
Basically I want MyBB to make less queries so that the execution time will be shortened.
EDIT: Oh and one more suggestion is to be able to use templates via files instead of the database.
Like any other forum software. But to do that you would need to create database template to file template generator which would be kinda a bit difficult to make.
The reason for this is cause I heared somewhere in the past, don't remember where that the templates via files method is faster.
Thanks. I hope I didn't ask something newbie or whatever.