Purple Turnip Posted July 30, 2009 Posted July 30, 2009 I'm installing DEMAND based sql_query_cache and I want to know if IPB will take advantage of this automatically?
bfarber Posted July 30, 2009 Posted July 30, 2009 No, IPB does not make use of this. Looking at the docs it would require select statements to be rewritten as "SELECT SQL_CACHE" instead, which IPB does not do.
Martin A. Posted July 30, 2009 Posted July 30, 2009 Wont MySQL use the cache automatically? Think I read somewhere that if the query is exactly the same as a previous query, it will use the results from the old one instead.
bfarber Posted July 30, 2009 Posted July 30, 2009 Normally, yes. The OP intends to change the configuration so it no longer functions as it would by default.
Purple Turnip Posted July 30, 2009 Author Posted July 30, 2009 The mySQL query cache has three states: OFF, ON, ON DEMAND m4rtin, only if it is set to "ON" will it cache all queries. Mine is set to "on demand" which means you have to tell it which queries to cache. It would be a bad idea to cache all the queries on IPB anyways.
bfarber Posted July 30, 2009 Posted July 30, 2009 Well, you're partially right. With it "on", all queries with result sets that fit within the defined query cache limit will be cached, until you fill the query cache up. So, it's not like every query result set will necessarily be cached. A typical query to pull all posts on a page, for instance, will frequently be larger than the default 1MB limit. http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_query_cache_limit
Purple Turnip Posted October 26, 2009 Author Posted October 26, 2009 I'd prefer if it was on DEMAND so that IPB can decide which queries are better for SQL caching and which ones aren't. This sounds like a fairly useful thing that can really help out with the server load.
bfarber Posted October 26, 2009 Posted October 26, 2009 Problem is, we support more than just MySQL, so it's a little trickier to implement query-specific caching. Besides, MySQL generally does a good enough job caching the query results with it's default settings.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.