title: MySql - WAMP - Huge Table is very slow (20 million rows)
body: <p>So I posted <a href="https://stackoverflow.com/questions/7354114/phpmyadmin-mysql-add-id-field-and-autopopulate-id-numbers">this</a>! yesterday and got a perfect answer, which required running this code first:  ALTER TABLE mytable AUTO_INCREMENT=10000001;</p>
  
  <p>I ran it several times, but restarted WAMP after a couple of hours of it not working.  After running overnight (12 hours), the code still hadn't run.</p>
  
  <p>I am wondering if my database table size is past the limits of mysql or my computer or both.</p>
  
  <p>However, I have a sneaky suspicion that proper indexing or some other factor could greatly impact my performance.  I know 20 million is a lot of rows, but is it too much?</p>
  
  <p>I don't know much about indexes, except that they are important.  I attempted to add them to the name and state fields, which I believe I did successfully.</p>
  
  <p>Incidentally, I am trying to add a unique ID field, which is what my post yesterday was all about.</p>
  
  <p>So, the question is:  Is 20 million rows outside the scope of MySql?  If not, am I missing an index or some other setting that would help better work with this 20 million rows?  Can I put indexes on all the columns and make it super fast?</p>
  
  <p>As always, thanks in advance...</p>
  
  <p>Here are the specs:</p>
  
  <p>My PC is XP, running WAMPSERVER, Win32 NTFS, Intel Duo Core, T9300 @ 2.50GHz, 1.17 GHz, 1.98 GB or RAM</p>
  
  <p>DB:  1 table, 20 million rows
  The size of the tables is:
  Data 4.4 Gigs, Indexes 1.3 Gigs, Total 5.8 Gigs</p>
  
  <p>The indexes are set up on the 'BUSINESS NAME' and 'STATE' fields</p>
  
  <p>The table fields are like this:</p>
  
  <pre><code>`BUSINESS NAME` TEXT NOT NULL, 
  `ADDRESS` TEXT NOT NULL, 
  `CITY` TEXT NOT NULL, 
  `STATE` TEXT NOT NULL, 
  `ZIP CODE` TEXT NOT NULL, 
  `COUNTY` TEXT NOT NULL, 
  `WEB ADDRESS` TEXT NOT NULL, 
  `PHONE NUMBER` TEXT NOT NULL, 
  `FAX NUMBER` TEXT NOT NULL, 
  `CONTACT NAME` TEXT NOT NULL, 
  `TITLE` TEXT NOT NULL, 
  `GENDER` TEXT NOT NULL, 
  `EMPLOYEE` TEXT NOT NULL, 
  `SALES` TEXT NOT NULL, 
  `MAJOR DIVISION DESCRIPTION` TEXT NOT NULL, 
  `SIC 2 CODE DESCRIPTION` TEXT NOT NULL, 
  `SIC 4 CODE` TEXT NOT NULL, 
  `SIC 4 CODE DESCRIPTION` TEXT NOT NULL 
  </code></pre>