Home > database >  How many is appropriate MySQL partitions?
How many is appropriate MySQL partitions?

Time:10-02

recently to MySQL in a table containing 100 million data partitioning, a preliminary plan to use Hash partitioning, who knows to do high efficiency of query and write?

CodePudding user response:

The main purpose of the hash, is to partition and partition; 100 million records, might as well divided into 20-100;

CodePudding user response:

Hash partition, the partition number is 2 N, 100 million data, divided into about 100, every 1 million more reasonable;
Too many partitions, because there are so many additional partitions maintenance operations, access operation may be more slowly,

CodePudding user response:

Thank you, that I was 100, the experiment before too much partition or too little is bad efficiency, but there has been no find the right standard

CodePudding user response:

reference POM_24 reply: 3/f
hash partition, the partition number is 2 N, 100 million data, divided into about 100, every 1 million more reasonable;
Too many partitions, because there are so many additional partitions maintenance operations, access operations may be slower, when

You said the partition number is 2 N is that meaning, partition is only 32-64-128 numerical points like this?

CodePudding user response:

reference 5 floor sinat_35940048 reply:
Quote: refer to the third floor POM_24 response:

Hash partition, the partition number is 2 N, 100 million data, divided into about 100, every 1 million more reasonable;
Too many partitions, because there are so many additional partitions maintenance operations, access operations may be slower, when

You said the partition number is 2 N is that meaning, partition is only 32-64-128 numerical points like this?


Not necessary, but if the hash partition partition number is not a power of 2, may cause each hash partitioning section of number is not balanced,
  • Related