MeenuAbhi
MeenuAbhi

Reputation: 27

alter table to add partitions and subpartitions in mysql

I have a table that I would like to create partition and subpartitions for it. I used the alter table statement but I am unable to create subpartitions even by using two alter table statements. I am only able to create a partition but not subpartitions.I need three levels of subpartitions.

When I execute the file,I keep getting the error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax

But when I remove the statement to create subpartition,I am able to successfully execute the file and create a partition.

Please suggest methods by which I can alter the table to create a partition and three levels of subpartitions.

Thanks in advance!

Upvotes: 0

Views: 836

Answers (1)

Rick James
Rick James

Reputation: 142208

First, I question whether PARTITIONing is useful at all. What is your application like?

Second, I have never found a use for SUBPARTITION, so I question whether sub-sub-partitioning is of any us either.

I have only found two cases where PARTITIONing speeds up SELECT. I can mention about 3 cases where admin stuff is helped by PARTITIONing. More discussion.

Please explain your purpose for partitioning.

Upvotes: 1

Related Questions