Monday, October 17, 2005

Partitioning on non-PK field

An interesting comment from Timo mentioned that he wanted to have
partitioning made on a non-PK field. The problem with this is that it
requires a global index on PK to be able to support the primary key
constraint on the table. Global indexes on partitioned tables will not
be supported in version 5.1.

What could be done here is to change the PK into a composite index
with the original PK fields + the partitioning field. Thus we get both
partitioning based on the field required and still have the PK constraint
possible to maintain.

If this is done then voila, the query will only use the server where the data
resides and won't need to access all parts.

Also dynamic repartitioning and possibility to add nodes online is a very cool
feature that would be nice to have. It is certainly on the roadmap but as
usual it is dependent on priorities in which version it actually arrives in.

No comments:

Post a Comment