2

In my site i have 20 simple querys cachable and 5 pretty big query no cachable on each page . So just activate mysql query cache isnot a good idea here, sure my 20 simple querys will cached but I loose 10% time processing for my 5 big querys for nothing.I'd like to say " hey mysql, don't try to test thoses 5 querys " I Would like to use query cache just for some querys and exclude others..

So, is it possible to choose who's query will cahable with mysql, or if not, do you know some other solution for that or an advise for my situation ?

thanks for ur lights regards Jess

3
  • I googled aand found this article and if you search for "Demand operating mode" it will tell you some stuff. I don't know anything about this topic. It sounds like you might...? So maybe this is meaningful to you? Dunno... Commented Nov 9, 2013 at 8:02
  • thanks, i know this article but they dont talk about the solution,SQL_NO_CACHE ! Commented Nov 9, 2013 at 8:32
  • I'm surprised anything gets slower when you enable caching. How did you measure the 10% time? Have you tried tuning the cache settings? dev.mysql.com/doc/refman/5.0/en/query-cache-configuration.html Commented Nov 9, 2013 at 14:58

1 Answer 1

3

Well the solution is pretty simple : Just use SQL_NO_CACHE in your select statement to exlude some query from mysql query cache, so thoses query will not loose time processing for test if this query is cachable or not !

SELECT SQL_NO_CACHE whatyouwant

Hope it helps

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.