I am looking for the best way, to alter an existing large table to a partitioned (probably hash) one. Create a new partioned one, copy all the data, relink foreign keys, drop the old table and rename the new sounds a bit awful. Is there a better way?
and I forgot:
5. split your one partition table to the partitions you really want.
Can't split, drop or merge hash partitions, though. Actualy it would be pretty ineffcient to keep splitting, and probably better to create the new table with the required partitions and insert into it.
kholger, when you say "probably hash", it makes me wonder whether you have got the right reasons worked out for using partitioning ... what problem are you trying to solve?