myisam_max_[extra]_sort_file_size足夠大
delay_key_write減少io,提高寫入性能
bulk_insert_buffer_size
concurrent_insert 設置為2
read_rnd_buffer_size random scan 使用
read_buffer_size 順序掃描表使用
key cache 的三種方式
key cache 預加載
SET GLOBAL hot_cache.key_buffer_size=16m
SET BLOBAL cold_cache.key_buffer_size=16m
CACHE INDEX example.top_message IN hot_cache
CACHE INDEX example.event IN cold_cache
LOAD INDEX INTO CACHE example.top_message,example.event IGNORE LEAVES
LOAD INDEX INTO CACHE example.user IGNORE LEAVERS,expamle.groups
MySQL 優化設置步驟