• Several types of partitioning:
    • most common – RANGE on some column, usually based on DATETIME
      CREATE TABLE somebiglog ( log_date DATETIME NOT NULL, column1 INTEGER, column2 VARCHAR(255) ) ENGINE=InnoDB PARTITION BY RANGE(YEAR(log_date)*10000+MONTH(log_date))
      ( PARTITION log201501 VALUES LESS THAN (201501),
      PARTITION log201502 VALUES LESS THAN (201502),
      PARTITION logother VALUES LESS THAN MAXVALUE );
      
    • also supports KEY, HASH and LIST partitioning and also some subpartitioning
  • Update and delete locks all partitions
  • on low level separate tables
  • one table can have only 1024 partitions
  • is useful only if you have milions or billions of rows otherwise on small tables it will slow down performance