title: Load a MySQL innodb database into memory
body: <p>I have a MySQL innodb database at 1.9GB, showed by following command. </p>
  
  <pre><code>SELECT table_schema "Data Base Name"
       , sum( data_length + index_length ) / 1 048 576 
         as "Data Base Size in MB"
       , sum( data_free )/ 1 048 576  
         as "Free Space in MB"
  FROM information_schema.TABLES
  GROUP BY table_schema ; 
  
  +--------------------+----------------------+------------------+
  | Data Base Name     | Data Base Size in MB | Free Space in MB |
  +--------------------+----------------------+------------------+
  | database_name      |        1959.73437500 |   31080.00000000 | 
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>Does it mean if I set the innodb_buffer_pool_size to 2GB or larger, the whole database can be loaded into memory so much fewer read from disk requests are needed?</p></li>
  <li><p>What does the free space of 31GB mean?</p></li>
  <li><p>If the maximum RAM can be allocated to innodb_buffer_pool_size is 1GB, is it possible to specify which tables to loaded into memory while keep others always read from disk?</p></li>
  </ol>
  
  <p>Thanks in advance.</p>