partitioningtable
This is an old revision of the document!
Partitioning help partitioned the table into smaller tables. It is best use if the table is expected to be huge.
Best to create the partition during creation of the table, however, for existing table, create a new table using partition, copy the data, then just rename the table.
Sample to create partition:
CREATE TABLE serial ( SerialID INT(11) NOT NULL AUTO_INCREMENT, ItemSerial VARCHAR(30) NULL DEFAULT '' COLLATE 'latin1_swedish_ci', PRIMARY KEY (`SerialID`) USING BTREE, INDEX itemserial (ItemSerial) USING BTREE; ) COLLATE='utf8mb4_general_ci' AUTO_INCREMENT=1 PARTITION BY RANGE (SerialID) (PARTITION `p005m` VALUES LESS THAN (500000) ENGINE = MyISAM, PARTITION `p010m` VALUES LESS THAN (1000000) ENGINE = MyISAM, PARTITION `p015m` VALUES LESS THAN (1500000) ENGINE = MyISAM, PARTITION `p020m` VALUES LESS THAN (2000000) ENGINE = MyISAM, PARTITION `p100m` VALUES LESS THAN MAXVALUE ENGINE = MyISAM);
partitioningtable.1743163263.txt.gz · Last modified: (external edit)
