HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Can we assign mysql Key_buffer_size value for particular table?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
canvaluemysqlkey_buffer_sizeforparticulartableassign

Problem

In some documents I found that we can assign key_buffer_size to myisam table. This also includes the following steps:

SET GLOBAL myisam_table.key_buffer_size = 4194304;

CACHE INDEX test.myisam_table IN myisam_table;

LOAD INDEX INTO CACHE test.myisam_table;


This command worked fine.

But how can I see the MyISAM table that is taking the key_buffer_size not the global one?

Is there any other MySQL engine that supports something similar?

Solution

You can't give this value for a particular table this value indicates Index blocks for MyISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks. The key buffer is also known as the key cache.

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_key_buffer_size

InnoDB engine type does support similar option called 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.

Context

StackExchange Database Administrators Q#19015, answer score: 2

Revisions (0)

No revisions yet.