views:

449

answers:

2

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  A: 

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.

Artem Russakovskii
It's not exactly the same, because it's used to cache data as well as indexes, whereas MyISAM uses the OS's cache for data and its own key buffer for indexes.
MarkR
I realize it's not the same but that's the closest InnoDB's got.
Artem Russakovskii
+1  A: 

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.

zombat