Thursday, December 18, 2008
How to Query Caching in MySQL?
(Explaining how to Query Caching in MySQL)
Query
Will MySQL supports Query Caching?
Answer:
YES
MySQL supports query caching if done some changes in the configuration file my.ini
Under [mysqld] section you can add,
query_cache_type = #query_cache_value#
#query_cache_value # can be any of the following,
query_cache_type = 0 => Caching is disabledquery_cache_type = 1 => Caching is enabled for all queriesquery_cache_type = 2 => this requires adding the keyword SQL_CACHE to the queries that are to be cached
Example
SELECT SQL_CACHE column1, column2 FROM table_name;
SELECT SQL_CACHE name, age FROM employees;
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment