title: how to partition a table in non primary key column (MYSQL)
body: <p>I have a table which contains 50GB data now I am trying to partition on the datetime column below are the details.</p>
  
  <pre><code>CREATE TABLE EDR2 ( id varchar(255),appKey varchar(255),clickedTime datetime ,ettId bigint(20),primary key(id),Key `ettId` (ettId),Key `clickedTime_index` (`clickedTime`) )
  PARTITION BY RANGE (day(clickedTime))
  ( PARTITION p01 VALUES LESS THAN (2) ,
  PARTITION p02 VALUES LESS THAN (3) ,
  PARTITION p03 VALUES LESS THAN (4) ,
  PARTITION p04 VALUES LESS THAN (5) ,
  PARTITION p05 VALUES LESS THAN (6) ,
  PARTITION p06 VALUES LESS THAN (7) ,
  PARTITION p07 VALUES LESS THAN (8) ,
  PARTITION p08 VALUES LESS THAN (9) ,
  PARTITION p09 VALUES LESS THAN (10) ,
  PARTITION p10 VALUES LESS THAN (11) ,
  PARTITION p11 VALUES LESS THAN (12) ,
  PARTITION p12 VALUES LESS THAN (13) ,
  PARTITION p13 VALUES LESS THAN (14) ,
  PARTITION p14 VALUES LESS THAN (15) ,
  PARTITION p15 VALUES LESS THAN (16) ,
  PARTITION p16 VALUES LESS THAN (17) ,
  PARTITION p17 VALUES LESS THAN (18) ,
  PARTITION p18 VALUES LESS THAN (19) ,
  PARTITION p19 VALUES LESS THAN (20) ,
  PARTITION p20 VALUES LESS THAN (21) ,
  PARTITION p21 VALUES LESS THAN (22) ,
  PARTITION p22 VALUES LESS THAN (23) ,
  PARTITION p23 VALUES LESS THAN (24) ,
  PARTITION p24 VALUES LESS THAN (25) ,
  PARTITION p25 VALUES LESS THAN (26) ,
  PARTITION p26 VALUES LESS THAN (27) ,
  PARTITION p27 VALUES LESS THAN (28) ,
  PARTITION p28 VALUES LESS THAN (29) ,
  PARTITION p29 VALUES LESS THAN (30) ,
  PARTITION p30 VALUES LESS THAN (31) ,
  PARTITION p31 VALUES LESS THAN MAXVALUE);*
  </code></pre>
  
  <p>and I am getting the error:-</p>
  
  <pre><code>***ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function***
  </code></pre>
  
  <p>I can't create a composite primary key in (id,clickedTime) and can not remove the primary key, because it will allow the duplicate records,
  I don't want to change anything in my code.
  so please suggest.</p>