title: Reset/compact mysql AI ID field?
body: <p>I have a fairly large table with about 250k rows. It has an auto incremented ID column that is really sort of useless. I can't just get rid of the column without rewriting too much of the app, but the ID is never used as a foreign key or anything else (except simply as an identifier when you want to delete a row, I guess). </p>
  
  <p>The majority of the data gets deleted and rewritten at least a few times a day (don't ask! it's not important, though I realize it's poor design!), though the total count of the rows stays fairly uniform. What this means is that each day to AI # increases by a quarter million or so.</p>
  
  <p>My question is this: in several years' time, the ID column will get too large for the INT value. Is there a way to "reset" the ID, like an <code>OPTIMIZE</code> or something, or should I just plan on doing a <code>SELECT INTO</code> a temp table and truncating the original table, resetting the ID to 0?</p>
  
  <p>Thanks</p>