phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Better performance of PHPBB2


 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
transm
Board Member



Joined: 28 Jun 2009

Posts: 13


flag
PostPosted: Fri Jul 17, 2009 1:11 am 
Post subject: Better performance of PHPBB2

I was just thinking that as long as no new posts are submitted, the only thing that changes from the topics table is the topic view number. Wouldn't it be better to move the counter to another table so that the topic table stays in the mysql query cache? How much faster would this be? Some boards don't really get that many posts and are mostly read for information. The only problem is the mysql query cache will be cleared if anything changes on the table such as when a new post is created.

We could just have a separate queries for the topic views in the viewforum too as there would only be a limited amount of topics displayed and it won't take long to just query the views for each one (this would also speed up viewforum).

I was also thinking of another separate table for topicviews that could contain more data such as userid and time so that more information can be shown such as who is viewing a topic etc.
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Fri Jul 17, 2009 2:33 pm 
Post subject: Re: Better performance of PHPBB2

Yeah, vBulletin has an option for this called deferred thread views.

What you do is make a table called topic_views with one column named topic_id. Make it an index (but not UNIQUE!), and every time a topic is viewed, insert its ID into this table.

When you update views every 30 minutes or so, you just select the total number of topic IDs for each topic and update the number in the topics table accordingly.

_________________
Moof! Email me: dog_cow@macgui.com
Inside Allerton Park Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL Mac 512K Blog
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0068 seconds using 15 queries. (SQL 0.0011 Parse 0.0001 Other 0.0055)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo