MySQL Forums
Forum List  »  Partitioning

Re: Partitioning by bigint
Posted by: Rick James
Date: September 18, 2009 06:56PM

Run this:
select id, hex(id) from PARTITION_TEST;
And notice the bottom of the numbers.
I guess HASH() only looks at the bottom of a BIGINT, maybe the bottom 32 bits, maybe less.

In fact, I'll bet that hash function is MOD(4).
Change your table definition to PARTITIONS 5 and you will get a much better distribution.



Edited 1 time(s). Last edit at 09/18/2009 07:00PM by Rick James.

Options: ReplyQuote


Subject
Views
Written By
Posted
4872
September 17, 2009 09:34AM
Re: Partitioning by bigint
2418
September 18, 2009 06:56PM
2410
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.