title: How to partition and subpartition MySQL by key?
body: <p>I want to add partition to my innoDB table. I have tried to search the syntax for this, but have not found specifics.</p>
  
  <p>Is this syntax wrong? :</p>
  
  <pre><code>ALTER TABLE Product PARTITION BY HASH(catetoryID1) PARTITIONS 6
  SUBPARTITION BY KEY(catetoryID2) SUBPARTITIONS 10;
  </code></pre>
  
  <p>Does <code>SUBPARTITIONS 10</code> mean each main partition has 10 subpartitions, or does it mean all main partitions have 10 subpartitions divided among them?</p>