What is the InnoDB equivalent of MyISAM's key_buffer_size?

徘徊边缘 提交于 2019-12-21 05:23:06

问题


When using MyISAM the configuration setting key_buffer_size defines the size of the global buffer where MySQL caches frequently used blocks of index data.

What is the corresponding setting for InnoDB?


回答1:


innodb_buffer_pool_size is the setting that controls the size of the memory buffer that InnoDB uses to cache indexes and data. It's an important performance option.

See the manual page for the full explanation. The MySQL Performance Blog also has an article about how to choose a proper size for it.




回答2:


As far as I know, the best setting you can adjust for InnoDB is innodb_buffer_pool_size.

The size in bytes of the memory buffer InnoDB uses to cache data and indexes of its tables. The default value is 8MB. The larger you set this value, the less disk I/O is needed to access data in tables. On a dedicated database server, you may set this to up to 80% of the machine physical memory size. However, do not set it too large because competition for physical memory might cause paging in the operating system.



来源:https://stackoverflow.com/questions/1217825/what-is-the-innodb-equivalent-of-myisams-key-buffer-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!