If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Query Caches

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-21-10, 13:46
iBrent iBrent is offline
Registered User
 
Join Date: Aug 2010
Posts: 1
Query Caches

Hi there,

I'm trying to enhance and develop my skills in MySQL and wondered what the difference was between the two: query_cache_type 1 and 2?

I can't get my head around it!

Cheers,
Sue
Reply With Quote
  #2 (permalink)  
Old 08-31-10, 18:13
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 619
Hi Sue,

there are 3 possible settings:

0 - off
1 - on for all queries that except those that explicitly state not to cache the query and the results. SELECT SQL_NO_CACHE ...
2 - off except for queries that explicitly state to be included in the query cache. SELECT SQL_CACHE ...

Ronan
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 09-06-10, 16:48
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 619
I have created a small demo to show the performance differences using the caching behaviour on MySQL. I created a table with 1,000,000 records and then attempted to group these. The query without caching takes approximately 1.75 seconds on my hardware platform but when caching is enabled the first iteration of the SQL takes 1.75 but subsequent queries takes 0.008 seconds. If you want a complete read of the post check it out here:

MySQL – query_cache_type IT Integrated Business Solutions
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On