rdbms - How to DROP Sub Partition in specific Partition in Mysql? -


i have created partitions , sub-partitions in table. partitions below :

partition range ( month(record_date)) subpartition hash (day(record_date)) ( partition p2012 values less (5) (     subpartition 01_04 engine = innodb,     subpartition 02_04 engine = innodb,     subpartition 03_04 engine = innodb,     subpartition 04_04 engine = innodb,     subpartition 05_04 engine = innodb,     subpartition 06_04 engine = innodb,     subpartition 07_04 engine = innodb,     subpartition 08_04 engine = innodb,     subpartition 09_04 engine = innodb,     subpartition 10_04 engine = innodb,     subpartition 11_04 engine = innodb,     subpartition 12_04 engine = innodb,     subpartition 13_04 engine = innodb,     subpartition 14_04 engine = innodb,     subpartition 15_04 engine = innodb,     subpartition 16_04 engine = innodb,     subpartition 17_04 engine = innodb,     subpartition 18_04 engine = innodb,     subpartition 19_04 engine = innodb,     subpartition 20_04 engine = innodb,     subpartition 21_04 engine = innodb,     subpartition 22_04 engine = innodb,     subpartition 23_04 engine = innodb,     subpartition 24_04 engine = innodb,     subpartition 25_04 engine = innodb,     subpartition 26_04 engine = innodb,     subpartition 27_04 engine = innodb,     subpartition 28_04 engine = innodb,     subpartition 29_04 engine = innodb,     subpartition 30_04 engine = innodb,     subpartition 31_04 engine = innodb   ),   partition p2013 values less (6)   (   subpartition 01_05 engine = innodb,   subpartition 02_05 engine = innodb,   subpartition 03_05 engine = innodb,   subpartition 04_05 engine = innodb,   subpartition 05_05 engine = innodb,   subpartition 06_05 engine = innodb,   subpartition 07_05 engine = innodb,   subpartition 08_05 engine = innodb,   subpartition 09_05 engine = innodb,   subpartition 10_05 engine = innodb,   subpartition 11_05 engine = innodb,   subpartition 12_05 engine = innodb,   subpartition 13_05 engine = innodb,   subpartition 14_05 engine = innodb,   subpartition 15_05 engine = innodb,   subpartition 16_05 engine = innodb,   subpartition 17_05 engine = innodb,   subpartition 18_05 engine = innodb,   subpartition 19_05 engine = innodb,   subpartition 20_05 engine = innodb,   subpartition 21_05 engine = innodb,   subpartition 22_05 engine = innodb,   subpartition 23_05 engine = innodb,   subpartition 24_05 engine = innodb,   subpartition 25_05 engine = innodb,   subpartition 26_05 engine = innodb,   subpartition 27_05 engine = innodb,   subpartition 28_05 engine = innodb,   subpartition 29_05 engine = innodb,   subpartition 30_05 engine = innodb,   subpartition 31_05 engine = innodb   ) 

)

now, want delete partition using below alter query :

alter table my_records drop partition 30_04; 

it gives me following error :

error 1507 (hy000): error in list of partitions drop

what syntax drop sub-partition. don't want use reorganize syntax.

rather tackle specific problem, let me point out partition+subpartition design useless.

  • by range ( month(...) ) not provide performance. furthermore, if have date range, pick all partitions.
  • by hash (...) not provide performance. and, again, range pick subpartitions.

please explain trying achieve. may possible have novel benefit of partitioning have not yet discovered.

consider simple partition range (to_days(...)) no subpartitions. it's main advantage in dropping oldest partition (as opposed slow delete). not provide speedup normal selects.

more discussion.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

android - CoordinatorLayout, FAB and container layout conflict -