MySQL Forums
Forum List  »  Partitioning

specific partitioning by varchar column
Posted by: Atanas Todorov
Date: March 19, 2008 04:37PM

create table dTable (
`provider` varchar(32) default null,
`time` datetime default null,
`value` double default null,
) engine=archive;

We have thousands of these tables (million rows each). The number of different providers is about 100-200 (less than 1024). How to partition the table so each piece contains per-provider data only? I tried already:
select count(distinct provider) from dTable;
alter table dTable partition by key(provider) partitions <providers_count>;

Obviously the internal hash function does not guarantee such behaviour.
Any ideas?

Atanas Todorov

p.s. I'm using 5.1.22-beta on winxp

Options: ReplyQuote


Subject
Views
Written By
Posted
specific partitioning by varchar column
4453
March 19, 2008 04:37PM


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.