title: Fragmenting a huge table
body: <p>I currently am working on some project that insert a lot of data into some tables. To ensure that my system is fast enough, I want to fragment my huge table into some smaller tables representing the months data. I have an idea of how it will work, but I still need some more informations.</p>
  
  <p>The primary keys of my tables must be continuous so I thought of an architecture that would look like this:</p>
  
  <pre><code>CREATE TABLE `foo` (
      `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
  }
  
  CREATE TABLE `foo012014` (
      `id` bigint(11),
      `description` varchar(255),
  }
  
  CREATE TABLE `foo022014` (
      `id` bigint(11),
      `description` varchar(255),
  }
  </code></pre>
  
  <p>On every insertion, the PHP page will look if a table already exists for the month and if not will create it. </p>
  
  <p>The thing is, how do I get to bind the "foo" child table primary key to the "foo" mother table? Plus, is this design a bad practice or is it good?</p>