MySQL stores every SQL text and results of the same in memory. When identical SQL text executes again that time MySQL retrieves data from CACHE and provides output. Indeed memory scan is faster than a disk scan.
This CACHE called QUERY CACHE.
For enabling Query Cache in MySQL.
Modify my.cnf with the following parameters.
Set query_cache_type = 0 means it is disabled
Set query_cache_type = 1 means it is enabled
Set query_cache_type = 2 means it is enabled but works on demand
Another parameter is query_cache_size. This parameter stands for the total size of the Query Cache.
for better performance, we can set it to 25MB. Modify this parameter in my.cnf and put bytes.
Thanks and regards,
When you want to make a strong Oracle DBA career then you should be aware of database services and other database technology. Without having knowledge of Oracle internals, Oracle performance tuning, and skill of Oracle database troubleshooting you can’t be an Oracle DBA expert.
This expert DBA Team club blog always provides you latest technology news and database news to keep yourself up to date. You should need to be aware of Cloud database technology like DBaaS. All Oracle DBA tips are available in a single unique resource at our orageek. Meanwhile, we are also providing some sql tutorials for Oracle DBA. This is the part of Dbametrix Group and you would enjoy more advanced topics from our partner resource.