Go Back   Web Server Hosting Forum by BODHost > Support > vps hosting
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-08, 01:55
Administrator
 
Join Date: Nov 2008
Posts: 4
Default Query caching in MySQL....

How does query caching in MySQL helps improve performance of dynamic web site?

First query cache is new and added in MySQL v4.x.x version only so if you are using old version of MySQL server it will not work.

When MySQL server recives a request it will parse it and retrives data from database/table and sent back to client browser. If same query request (in case of dynamic content) comes repeatedly and server will just sent them result from cache (thus saving disk I/O and other associated cost with each query).

Please note that when data stored in table is modified, any related cached entries in the query cache are flushed.

How do I find out my MySQL query cache is working or not...
Very simple, MySQL provides the stats of same just type following command at mysql> prompt:

mysql> show status like 'Qcache%';

+-------------------------+----------+
| Variable_name | Value |
+-------------------------+----------+
| Qcache_free_blocks 1
| Qcache_free_memory 15766912
| Qcache_hits 3
| Qcache_inserts 1
| Qcache_lowmem_prunes 0
| Qcache_not_cached 6
| Qcache_queries_in_cache 1
| Qcache_total_blocks 4
+-------------------------+----------+
__________________
Thanx
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 23:53.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.