Reputation: 1035
innodb_buffer_pool_size - This parameter is used to define the memory allocated to cache data which is frequently used. I have many tables in my schema which has million records in it. when I checked buffer cache usage it is occupied all the allocated memory.
Is there any way to identify the what are the tables or indexes are being cached and for which cache hit is higher than others? Once I get it finally I may delete some data from those data.
If table contains 1000 records and if a query executed with condition on primary key. Does it cache whole index in buffer cache?
If none of above is the solution, I can reduce size for MySql buffer. If there is any other way to decrease the memory usage for MySql process as I want to allocate to other process.
Upvotes: 1
Views: 301
Reputation: 142298
No.
The "cache" works on a block-by-block base, not whole table, nor whole indexes.
INDEX
of a table is organized in a BTree of 16KB blocks.To your questions:
More to note:
OK, I have rambled on too long. What would you like to know next?
Upvotes: 1