Alot of Queries [message #4807] |
Wed, 07 August 2002 16:41 |
MrDigory
Messages: 12 Registered: August 2002
Karma: 0
|
Junior Member |
|
|
I installe 2.2.3 on my server to run some initial tests and work on a style, but I foun something which sort of bothere me. For each reply in thread view, there seems to be an extra querie. It rapily went from a mere 8 to 30! That seems like a lot, and I also notice I can't get the forum to run as fast as it oes here.
Any suggestion?
|
|
|
Re: Alot of Queries [message #4810 is a reply to message #4807] |
Wed, 07 August 2002 17:01 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Hrm... I'll check about the query counts, are you referring to the thread list page which shows a list of threads within a forum or a tree view?
Well, there are number of things, which make a forum run faster, 1st ans formost is configuration of PHP. Since PHP needs to output lots of data turning on output buffering helps the page speed quite a bit. Also compiling PHP, MySQL & Apache with optimization options will add even more speed to your forum.
FUDforum Core Developer
|
|
|
|
Re: Alot of Queries [message #4812 is a reply to message #4811] |
Wed, 07 August 2002 17:40 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Okie, I'll check, this.
The message retrieval itself and majority of the data itself is fetched with 1 query. However, if a message has a poll or file attachments that would result in an additional query, which is needed to fetch the file attachment(s) or poll information.
FUDforum Core Developer
|
|
|
|
Re: Alot of Queries [message #4815 is a reply to message #4813] |
Wed, 07 August 2002 20:26 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
As anonymous user I've looked at thread #1 (test), this is the one with 4 replies.
According to the page stats, that page took 15 queries to generate and had reported the following timings:
15 MySQL queries took 0.0096697807312012 seconds
Total time taken to generate the page: 0.034555077552795 seconds
Thread #3 (no replies), took 14 queries to generate and had reported the following timings:
14 MySQL queries took 0.010731935501099 seconds
Total time taken to generate the page: 0.032771944999695 second
As you can see there is a difference of only 1 query, and that query is because thread #1 had a message with an attachment. As I've explained before attachments require additional query.
However, you were correct, in <2.2.3 versions there was a nasty bug, that caused a harmless query to occur for every message, that query occurred IF a user was not ignoring anyone and the ignore list array was blank. Which would cause a fast query to be ran on the ignore list table.
After looking at the CVS I see that this particular problem has been resolved somewhere along the lines during the 2.2.4X dev release.
FUDforum Core Developer
|
|
|
|
Re: Alot of Queries [message #4827 is a reply to message #4822] |
Thu, 08 August 2002 12:23 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well, like I've said later version removes the unneeded queries, 2.2.4 includes many other optimizations as well.
FUDforum Core Developer
|
|
|