Partitioning by bigint
Chaps,
I've got a table with a bigint column that I wish to partition by, but it seems that in certain circumstances all the data goes into a single partition. e.g.:
DROP TABLE IF EXISTS PARTITION_TEST;
CREATE TABLE `PARTITION_TEST` (
`id` bigint(10) unsigned NOT NULL,
`value` int(10) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH (id) PARTITIONS 4;
INSERT INTO PARTITION_TEST (id) VALUES (11657036521603072);
INSERT INTO PARTITION_TEST (id) VALUES (59294524551266304);
INSERT INTO PARTITION_TEST (id) VALUES (79928586823335936);
INSERT INTO PARTITION_TEST (id) VALUES (85483353926598656);
INSERT INTO PARTITION_TEST (id) VALUES (157408967914487808);
INSERT INTO PARTITION_TEST (id) VALUES (197222601783836672);
INSERT INTO PARTITION_TEST (id) VALUES (316376857274548224);
INSERT INTO PARTITION_TEST (id) VALUES (317962988696961024);
INSERT INTO PARTITION_TEST (id) VALUES (322452419227222016);
INSERT INTO PARTITION_TEST (id) VALUES (326402247246282752);
INSERT INTO PARTITION_TEST (id) VALUES (394283565409435648);
SELECT PARTITION_NAME, PARTITION_ORDINAL_POSITION, PARTITION_METHOD, PARTITION_EXPRESSION, PARTITION_DESCRIPTION, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH FROM information_schema.PARTITIONS WHERE TABLE_NAME="PARTITION_TEST" ORDER BY PARTITION_ORDINAL_POSITION ASC
This produces:
p0 1 HASH id 11 1489 16384
p1 2 HASH id 0 0 16384
p2 3 HASH id 0 0 16384
p3 4 HASH id 0 0 16384
Any ideas?
Cheers in advance!
Subject
Views
Written By
Posted
Partitioning by bigint
4891
September 17, 2009 09:34AM
2431
September 18, 2009 06:56PM
2421
September 21, 2009 03:12AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.