Server System Variables
485
Dynamic Variable
Yes
Permitted Values
Platform
Bit Size
32
Type
numeric
Default
4096
Range
512 .. 4294967295
Permitted Values
Platform
Bit Size
64
Type
numeric
Default
4096
Range
512 .. 18446744073709547520
The minimum size (in bytes) for blocks allocated by the query cache. The default value is 4096
(4KB). Tuning information for this variable is given in
Section 8.6.3.3, “Query Cache Configuration”
.
•
query_cache_size
[485]
Command-Line Format
--query_cache_size=#
Option-File Format
query_cache_size
Option Sets Variable
Yes,
query_cache_size
[485]
Variable Name
query_cache_size
Variable Scope
Global
Dynamic Variable
Yes
The amount of memory allocated for caching query results. The default value is 0, which disables
the query cache. The permissible values are multiples of 1024; other values are rounded down to
the nearest multiple. Note that
query_cache_size
[485]
bytes of memory are allocated even if
query_cache_type
[485]
is set to 0. See
Section 8.6.3.3, “Query Cache Configuration”
, for more
information.
The query cache needs a minimum size of about 40KB to allocate its structures. (The exact size
depends on system architecture.) If you set the value of
query_cache_size
[485]
too small, a
warning will occur, as described in
Section 8.6.3.3, “Query Cache Configuration”
.
•
query_cache_type
[485]
Command-Line Format
--query_cache_type=#
Option-File Format
query_cache_type
Option Sets Variable
Yes,
query_cache_type
[485]
Variable Name
query_cache_type
Variable Scope
Global, Session
Dynamic Variable
Yes
Set the query cache type. Setting the
GLOBAL
value sets the type for all clients that connect
thereafter. Individual clients can set the
SESSION
value to affect their own use of the query cache.
Possible values are shown in the following table.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...