Friday, August 21, 2009
MySQL Query Cache - Improving Performance of SQL Queries
MySQL Query Cache
(Explaining how to Query Caching in MySQL)
Will MySQL supports Query Caching?
The answer is “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 disabled
query_cache_type = 1 => Caching is enabled for all queries
query_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;
For more information, Pls visit http://dev.mysql.com/doc/refman/6.0/en/query-cache.html
Keywords: MySQL, Caching, Query Caching, Query Optimization, Performance Optimization, MySQL Performance Optimization
No comments :
Post a Comment