Following create table statement with Partition
-
runs in 10 Second on My Development Machine windows 7, i5 , 8GBRam, single disk
-
runs in 16 Second on Virtual Machine windows server 2012 , xeon 2GHz , 615MB Ram, single disk
-
While takes 100 Seconds on my server machine Windows server 2008 R2 Standard, xeon 2.4 2 Processors, 32 GB Ram, ATA SCSI Mirror drives
I am not able to understand why there is so much performance difference ..
CREATE TABLE IF NOT EXISTS `TestSpeed`.`CTM` (
`ServerID` BIGINT NOT NULL,
`ClientID` BIGINT NOT NULL,
`CommunityID` INT NOT NULL,
PRIMARY KEY (`ClientID`,`CommunityID`),
UNIQUE INDEX `IX_CTM` (`ServerID` ASC,`CommunityID`),
INDEX `IX_CTM_ClientID` (`ClientID` ASC))
PARTITION BY HASH (CommunityID) PARTITIONS 300;
Best Answer
ANALYTICAL EXPERIMENT
Looking at CREATE TABLE and seeing that you are creating 300 partitions, I need you to perform an experiment. Please run the following script:
I have the following on my laptop at home
I got the following results
COMPARISON OF STORAGE ENGINES
MyISAM
It took 1.09 seconds to make 300 partitions using MyISAM. . It create the following:
.frm
file (Manage the Table).par
file (Manage Partitions).MYD
files (Partition Data).MYI
files (Partition Indexes)File Listing from Windows Command Line
InnoDB
It took 2 min 49.83 seconds to make 300 partitions using InnoDB. It create the following:
.frm
file (Manage the Table).par
file (Manage Partitions).ibd
files:File Listing from Windows Command Line
CONCLUSION OF THE EXPERIMENT
InnoDB's storage engine management is a definite bottleneck. This is not such much the number of files. Why ? If the number of files per partition was the sole factor, it should have taken 0.545 seconds to create half the number of file. It took 2 min 49.83 sec. How ?
MySQL's partition management is essentially the same. Once the storage engine layer is reached, InnoDB's data dictionary is evidently monitoring each partition's registration.
YOUR ORIGINAL QUESTION
Now that you know how InnoDB is functioning while files are being created, now look at your disks.
You have Disks on 3 other Windows OS platforms
I can confidently say the following
RECOMMENDATION
GIVE IT A TRY !!!