Page 1 of 5

[RC] SQL Cache (Cached Generation)

Posted: Fri Oct 14, 2005 8:49 pm
by Doobdee
Greetings,

Introduction :arrow:
This topic is about cached generation time mod on http://www.phpbbstyles.com

Current Version :arrow:
1.2.2

This is a stable version for phpBB 2.x
I am planning to releas final version and submit it to the MOD database very soon.

About :arrow:
This mod is a very powereful mod:
- Caches SQL Queries (faster forum)
- Ads Page generation time (in overall_footer.php)
- Ads SQL querie counter (in overall_footer.php)
- This page generation MOD is highly effecient for forum speed.

Demo :arrow:
Output down the bottom of the page
Image

Example Of XS MOD update checker
Image

Download :arrow:
Version 1.2.2 - Download

Information :arrow:
If you receive any bugs, please report them.
Also in the future, more SQL queries can be cached but at the moment this matches phpBBstyles configuration

To cache more SQL queries replace $db->sql_query($sql) with $db->sql_query($sql, false, true) or something like $db->sql_query($sql, false, 'posts_')

Optimization
If you want effecient forum, I recommend installing eXtreme Style MOD and this one.

Posted: Sat Oct 15, 2005 1:15 am
by da_badtz_one
Excellent mod, I'm extremely happy to see a mod like this made. The one I'm creating contains messier coding. One of the problems which I would surely want this mod have would be that there will be other mods installed on phpBB like subforums which has a changing t.topic_title variable. So making it update every x minutes would be good :)

Posted: Sat Oct 15, 2005 8:23 am
by deny
It is always great to have mod that speed up your board.
However i'll wait a little bit on 100% stable version and then implemented on my board.It seems that some people on phpBBstyles still have some a minor problems.

Posted: Sat Oct 15, 2005 9:01 am
by Doobdee
Sql queries that involve phpbb_sessions and phpbb_users are not cached. (own data exception).

Others are

Re: [RC1] SQL Cache (Cached Generation)

Posted: Sat Oct 15, 2005 10:27 am
by deny
Doobdee wrote: Also in the future, more SQL queries can be cached but at the moment this matches phpBBstyles configuration

To cache more SQL queries replace $db->sql_query($sql) with $db->sql_query($sql, false, true) or something like $db->sql_query($sql, false, 'posts_')


It will be nice if you can provide this mod for people without phpbbstyles configuration and for people with phpBBstyles configuration.
If you say only "To cache more SQL queries replace $db->sql_query($sql) with..." etc then it can confuse a lot people.

Re: [RC1] SQL Cache (Cached Generation)

Posted: Sat Oct 15, 2005 10:37 am
by Doobdee
deny wrote:
Doobdee wrote: Also in the future, more SQL queries can be cached but at the moment this matches phpBBstyles configuration

To cache more SQL queries replace $db->sql_query($sql) with $db->sql_query($sql, false, true) or something like $db->sql_query($sql, false, 'posts_')


It will be nice if you can provide this mod for people without phpbbstyles configuration and for people with phpBBstyles configuration.
If you say only "To cache more SQL queries replace $db->sql_query($sql) with..." etc then it can confuse a lot people.


Greetings,

By that I meant, it currently matches that website. Support for modcp.php and groupcp.php will be in next release, which I am planning on being final release.

Posted: Fri Oct 28, 2005 2:30 am
by ZombieSlayer
Well it doesn't work properly using easymod.

I need to know how to uninstall this mod so that I can install it without using easymod.

Ever since installation the forum is slower and it doesn't show the time or queries in the footer (even after I manually edited the files for my templates [morpheus/subBalck/gen Electro/subSilver]).

I should add that I am not getting any errors and the forums function just fine.

Posted: Sat Oct 29, 2005 1:40 am
by ZombieSlayer
Ok the slow loading had something to do with the server and not the mod :oops:

However it still doesn't show the time or queries in the footer (even after I manually edited the files for my templates [morpheus/subBalck/gen Electro/subSilver]). :?

Posted: Sat Oct 29, 2005 8:59 am
by Ptirhiik
IMHO, you may prefer inherit from sql_db class rather than editing it : it would allow to be sql engine independant. Take a look how I did it in Categories Hierarchy 2.1.2, it will give you some tips ;).

Posted: Mon Feb 13, 2006 4:09 am
by Marnboorapa
It's my really need mod , but I will wait untill this mod more stable. One thing that I don't love in phpBB is too many queries , and many hosting in my country is not allow phpbb forum.

My requests ::

1. Please make this mod can install without XS system [ many people use phpbb original cache not XS system ] .

2. Reduce useless sql query from original phpbb.


I think this mod is very nice solution for many websites whichs use phpbb forum.

Posted: Mon Feb 13, 2006 4:35 am
by Peter77sx
I installed this MOD a couple months ago. it cuts your queries very low. I would recommend the eXtreme style mod too... makes your phpbb faster. :)

Posted: Mon Feb 13, 2006 5:46 am
by onigumo
Peter77sx wrote: I installed this MOD a couple months ago. it cuts your queries very low.


Was there a notable page load time decrease or was there an indication that it was going faster? If so, how long did it take for this to happen? I installed it once but was hasty in uninstalling it because the page generation info in my forum's footer indicated that load time was slower despite less SQL queries being executed. And I felt page loading was a bit slower as I went from page to page seeing if there's a general difference.

Posted: Mon Feb 13, 2006 1:01 pm
by drathbun
onigumo wrote: I installed it once but was hasty in uninstalling it because the page generation info in my forum's footer indicated that load time was slower despite less SQL queries being executed.

Having fewer queries is not always a good thing. Sometimes two more efficient queries are better than one large query, especially if outer (left or right) joins are involved. I don't know how that relates to the MOD being developed here, as I have not looked at the code. But the rule regarding queries and "less is better" is not 100% true.

Posted: Mon Feb 13, 2006 4:28 pm
by Marnboorapa
But too many queries is a big problem if a forum which has a large database , but I think phpBB is use queries less than phpnuke or other nuke

I think when phpBB 3.0.0 has come we will amazing how it so fast and use few queries.

Posted: Mon Feb 13, 2006 5:02 pm
by drathbun
Marnboorapa wrote: But too many queries is a big problem if a forum has a large database

I disagree. :-)

Read the very first post of the Tweaks for Large Forums post in the phpBB Discussion area. One of the tweaks involves breaking a single large query (large meaning it accesses lots of tables) into two more specific queries for performance.

I get the concept of this MOD, and it's a good one. Being able to use the same query results more than once is a great way to save time. Heck, even running the same SQL more than once helps, as MySQL itself has its own query cache. My MySQL query cache hit rate jumped from 76% to 85% with a couple of simple changes I made on my board a while back, and you could see the performance improvement.

But when I see people say "too many queries is bad" I have to comment. To many queries is not bad, too many bad queries is bad. 8)