Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6540017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:55:42+00:00 2026-05-25T10:55:42+00:00

So I posted this ! yesterday and got a perfect answer, which required running

  • 0

So I posted this! yesterday and got a perfect answer, which required running this code first: ALTER TABLE mytable AUTO_INCREMENT=10000001;

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.

I am wondering if my database table size is past the limits of mysql or my computer or both.

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?

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.

Incidentally, I am trying to add a unique ID field, which is what my post yesterday was all about.

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?

As always, thanks in advance…

Here are the specs:

My PC is XP, running WAMPSERVER, Win32 NTFS, Intel Duo Core, T9300 @ 2.50GHz, 1.17 GHz, 1.98 GB or RAM

DB: 1 table, 20 million rows
The size of the tables is:
Data 4.4 Gigs, Indexes 1.3 Gigs, Total 5.8 Gigs

The indexes are set up on the ‘BUSINESS NAME’ and ‘STATE’ fields

The table fields are like this:

`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 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:55:42+00:00Added an answer on May 25, 2026 at 10:55 am

    Some answers:

    • 20 million rows is well within the capability of MySQL. I work on a database that has over 500 million rows in one of its tables. It can take hours to restructure a table, but ordinary queries aren’t a problem as long as they’re assisted by an index.

    • Your laptop is pretty out of date and underpowered to use as a high-scale database server. It’s going to take a long time to do a table restructure. The low amount of memory and typically slow laptop disk is probably constraining you. You’re probably using default settings for MySQL too, which are designed to work on very old computers.

    • I wouldn’t recommend using TEXT data type for every column. There’s no reason you need TEXT for most of those columns.

    • Don’t create an index on every column, especially if you insist on using TEXT data types. You can’t even index a TEXT column unless you define a prefix index. In general, choose indexes to support specific queries.

    You probably have many other questions based on the above, but there’s too much to cover in a single StackOverflow post. You might want to take training or read a book if you’re going to work with databases.
    I recommend High Performance MySQL, 2nd Edition.


    Re your followup questions:

    For MySQL tuning, here’s a good place to start: http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/

    Many ALTER TABLE operations cause a table restructure, which means basically lock the table, make a copy of the whole table with the changes applied, and then rename the new and old tables and drop the old table. If the table is very large, this can take a long time.

    A TEXT data type can store up to 64KB, which is overkill for a phone number or a state. I would use CHAR(10) for a typical US phone number. I would use CHAR(2) for a US state. In general, use the most compact and thrifty data type that supports the range of data you need in a given column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is a rephrasing of a question I posted yesterday. I got an answer
I posted this question yesterday evening, which has led me to discover a huge
I posted this yesterday on SO, and I received an answer that works great,
I posted this question yesterday and the answer I go mentioned that I should
This is my first Clojure macro -- I am an uber-noob. Yesterday I posted
I got interested in this question someone posted yesterday about diamond-square algorithms, Node.js /
Yesterday I posted this question regarding using lambdas inside of a Join() method to
This is a followup to a question I posted yesterday. I thought everything was
I posted this very same item on SERVERFAULT, but got no reply. So here
I have posted this yesterday, I didn't get the the answers that could solve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.