Wishlist 0 ¥0.00

Mysql查询缓存和执行流程

执行流程:

images/j2xml/b3e623c1c18f52338bcaf7b12737b292.png

 

相关参数:

have_query_cache mysql是否支持查询缓存

query_cache_type on/off 是否有开启

query_cache_size 为查询缓存分配的总的大小,为0表示没有分配,如果过小,Qcache_lowmem_prunes(内存不足,被删除的条目)状态会增加,Qcache_free_memory也会趋近于0

query_cache_limit  能够缓存的最大结果,如果超出,则增加 Qcache_not_cached状态的值

query_cache_min_res_unit 分配内存块时最小的单位,默认4k

query_cache_wlock_invalidate 如果查询的时候,这个表被锁住了,是否忽略,默认为off,表示直接从查询缓存中获取

 

 

清除查询缓存:

RESET QUERY CACHE;

 

重置mysql的状态变量

FLUSH STATUS;

 

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.