Posts: 436771 Topics: 21978 LOGIN

Home >> Computers Hardware&Software >> Speed of the website

04.01.2008, 09:48 quote

Anonymous

Ok, I found a nasty killer query:

Art:

flush table forum_forms;
flush table forum_topics;
flush table forum_posts;
SELECT SQL_NO_CACHE t.topic_id, t.topic_title, t.topic_title_url, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id,
f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce,
 f.auth_pollcreate, f.auth_vote, f.auth_attachments, f.forum_url, f.forum_domain
        FROM forum_topics t, forum_forums f, forum_posts p
        WHERE p.post_id > 136463
                AND f.forum_id = t.forum_id
                 order by t.topic_id asc limit 1;

#1030 - Got error 28 from storage engine


I hope replacing that query with something else will speed up the website a bit!

That's the problem with PhpBB based forums...sometimes they don't use joins or "fatal" where statements that make no sense.

 

04.01.2008, 09:56 quote

Anonymous

god wrote:


That's the problem with PhpBB based forums...sometimes they don't use joins or "fatal" where statements that make no sense.


As a matter of interest, which version of phpBB are you using for the forums?

 

04.01.2008, 10:13 quote

Anonymous

Can't remember. Does it show anywhere ?

However, I have replaced half of the queries by now and added some additional code.

I am going to replace all queries that take longe then 0.001 seconds though.

Maybe I'll check out JavaBB some day.

p.s.: the last query was not phpbb's fault Embarassed however, they do not make use of inner joins and often you find "joins" using where statements.
Also the topic view counter should be in a separate table to avoid locking during updates that occur almost every second...therefore I made a cron job to update them only once an hour for the time being.

 

04.01.2008, 10:32 quote

Anonymous

god wrote:
Can't remember. Does it show anywhere ?


The version release usually shows in the Admin index page (right frame), and tells you which version you're running and what the latest release is that you can upgrade to. I'm guessing this forum is quite heavily modified, so upgrading would be quite a big job?

I've done a few upgrades to phpBB3 recently, but I try to convince clients to go for a script that is a bit more reliable, like the SMF script (Simple Machines Forum) - it has an excellent conversion tool and converts from phpBB to SMF (although not sure how a conversion would with such a big database as the one that runs this forum!

But since it probably isn't the script that is casing most of the problems I guess it would be a waste of time converting to another script if the problems lie mainly with the MySQL queries.

 

04.01.2008, 11:01 quote

Anonymous

The problem with PhpBB is the permissions tables...for every single users you have an additional rows in some tables.....so if you have over 300,000 users you have lots of unnecessary data in your tables....

 

04.01.2008, 16:58 quote

beddo
Joined: 15 Oct 2006 Posts: 308 Location: United Kingdom, England, Merseyside
View user's profile Visit poster's website

The most information given out in the source code is version 2.0
No info on the minor release and I've not had reason to look at v3

Unfortunately the way to track down problems is accounting which puts more load on the server! Looks like you're getting there though. I tend to do my best not to modify the base code unless I have to. Makes it easier to upgrade to a less buggy version in the future Smile

 
 
Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum