mysql配置优化

SHOW VARIABLES LIKE ‘%cache%’;
+——————————+———————-+
| Variable_name | Value |
+——————————+———————-+
| binlog_cache_size | 32768 |
| binlog_stmt_cache_size | 32768 |
| have_flashcache | YES |
| have_query_cache | YES |
| key_cache_age_threshold | 300 |
| key_cache_block_size | 1024 |
| key_cache_division_limit | 100 |
| max_binlog_cache_size | 18446744073709547520 |
| max_binlog_stmt_cache_size | 18446744073709547520 |
| metadata_locks_cache_size | 1024 |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 16777216 |
| query_cache_strip_comments | OFF |
| query_cache_type | ON |
| query_cache_wlock_invalidate | OFF |
| stored_program_cache | 256 |
| table_definition_cache | 400 |
| table_open_cache | 400 |
| thread_cache_size | 8 |
+——————————+———————-+

show status like ‘%cache%’;
+——————————–+———-+
| Variable_name | Value |
+——————————–+———-+
| Binlog_cache_disk_use | 2 |
| Binlog_cache_use | 15514049 |
| Binlog_stmt_cache_disk_use | 0 |
| Binlog_stmt_cache_use | 1170 |
| Com_assign_to_keycache | 0 |
| Flashcache_enabled | OFF |
| Qcache_free_blocks | 2005 |
| Qcache_free_memory | 6565712 |
| Qcache_hits | 77732 |
| Qcache_inserts | 590516 |
| Qcache_lowmem_prunes | 557510 |
| Qcache_not_cached | 338374 |
| Qcache_queries_in_cache | 7191 |
| Qcache_total_blocks | 16631 |
| Ssl_callback_cache_hits | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_used_session_cache_entries | 0 |
| Threads_cached | 3 |
+——————————–+———-+

 

mysql缓存参数
MYSQL缓冲区和缓存设置
MySQL 数据库性能优化之缓存参数优化
MySQL写入优化