Adding partitions to a partitioned table  Changing the partitioning key

Chapter 10: Partitioning Tables and Indexes

Changing the partitioning type

NoteYou must drop all indexes before changing the partitioning type.

The titles table was range-partitioned in “Adding partitions to a partitioned table”. In this example, we repartition titles by hash on the title_id column:

alter table titles partition by hash(title_id)
	3 on (seg1, seg2, seg3)	

We can repartition titles again by range on the total_sales column.

alter table titles partition 
		by range (total_sales)
	(smallsales values <= (500) on seg1,
	mediumsales values <= (5000) on seg2,
	bigsales values <= (25000) on seg3)




Copyright © 2005. Sybase Inc. All rights reserved. Changing the partitioning key

View this book as PDF