title: How do I efficiently change a MySQL table structure on a table with millions of entries?
body: <p>I have a <a href="http://en.wikipedia.org/wiki/MySQL" rel="nofollow">MySQL</a> database that is up to about 17&nbsp;GB in size and has 38 million entries.  At the moment, I need to both increase the size of one column (varchar 40 to varchar 80) and add more columns.  </p>
  
  <p>Many of the fields are indexed including the one that I need to change. It is part of a unique pair that is necessary for the applications to work. In attempting to just make the change yesterday, the query ran for almost four hours without finishing, when I decided to cut our outage and just bring the service back up. </p>
  
  <p>What is the most efficient way to make changes to something of this size?</p>
  
  <p>Many of these entries are also old and if there is a good way to sort of shard off entries but still have them available that might help with this problem by making the table a much more manageable size.</p>