mysql - PRIMARY set as VARCHAR -


I have a table where the primary key is set to VARCHAR (14) . >

When I get a high amount of visitors, the I / O rate of the server gets insane and when I use iotop , I can see that mysql there is a problem.

Use method, select a line by using select varchar key for every travel script. There are no joining or any other complex questions.

Is this crazy I / O rate caused by the VARCHAR key? Do I call it INT (11) ?

Thank you,

Change to Edit : This picture can help:

> It is compiled on the primary key ). Since Wakara keys are not sequential, this means that your inclusions are not sequential, which are random, which is a heavy I / O operation. So first check that high I / O writes, does not read. However, due to I / O, even if the IDs are unique character strings, it is difficult to correctly load the correct subsets of IDs in the buffer pool for MySQL (as it always loads a full page and single No record), and if the buffer pool is small, then it will need to load a new page in the buffer pool for each request, which means that the dirty page etc. will have to be flush, which is actually in the I / O subsystem. The reason for reading and writing loads is Therefore, if you can not change the type of primary key, check your innodb_buffer_pool_size.

If you need more help, then please post the innodb_buffer_pool_size value, as well as the correct structure of the table, the size GB / number of records, and the questions used in the table.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -