MySQL's Query Cache
Popularity Report
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
|||
![]() |
URL Tag Cloud
Bookmark History
Saved by 15 people (9 private), first by anonymouse user on 2006-03-15
- Alfredwesterveld on 2008-04-07 - Tags cache , mysql , performance , toread
- Menendez on 2008-03-21 - Tags mysql , optimization
- Pulsorock on 2008-01-11 - Tags cache , mysql , php
- Del__t on 2007-03-25 - Tags imported furl
- Test_dellll on 2007-03-24 - Tags cache , imported:delicious , mysql , performance
Public Sticky notes
To make sure MySQL uses
the query cache, there are a few variables you need to set in the configuration
file (usually my.cnf or my.ini). First, is the query_cache_type. There
are three possible settings: 0 (for off, do not use), 1 (for on, cache queries)
and 2 (on demand, discussed more below). To ensure it is always on, place:
Highlighted by joel
Note that
these are results from MySQL 4.0.x - you'll see more in versions 4.1.x and
beyond. The query_cache_type will be set to ON or OFF as appropriate. However,
there is one more to set, and that is the query_cache_size. If set to 0
(the default), the cache will be disabled. This variable determines the memory,
in bytes, used for the query cache. For our purposes, we will set it to 20 MB:
Highlighted by joel


Public Comment