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 6877443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:36:04+00:00 2026-05-27T04:36:04+00:00

I have a MySql Db with innoDB tables. I need to alter a couple

  • 0

I have a MySql Db with innoDB tables.

I need to alter a couple of big tables (~50M records), since altering locks the tables I want to make the process as fast as possible.

What is best in term of speed:
1. altering one table at a time
2. alter both tables on the same time (simultaneously)

any ideas?

  • 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-27T04:36:05+00:00Added an answer on May 27, 2026 at 4:36 am

    Really depends on how much memory you have in your server.

    When you’re doing ALTER TABLE, you really want the table and its largest secondary index (remember innodb clusters the primary key, so PK is stored with the rows) to fit into memory. If it doesn’t, it’s going to be slow (NB: This discussion assumes the table is not partitioned).

    As your table has a tiny 50M rows, the chances are it fits in RAM trivially (you have 32G+ on your server, right?) with all its secondary indexes.

    If it all fits in the innodb buffer pool, do them in parallel. If it doesn’t do them in series.

    Try it on your development server which has the same spec as production (obviously configure them with the same size innodb_buffer_pool)

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

Sidebar

Related Questions

I have a relatively big MySQL InnoDB table (compressed), and I sometimes need to
I have a MySQL-InnoDB table with 350,000+ rows, containing a couple of things like
I have a MySql db with innoDB tables. Very simplified this is how two
Here's some background info. I have three MySQL tables (all InnoDB). The first table
I have a number of tables I need to convert from mySQL to SQL
I have a set of InnoDB tables that I periodically need to maintain by
I need to perform the following on MySQL/InnoDB. Assume I have a table consists
I need to insert millions rows into the MySQL database (InnoDB engine). I have
I have large MySQL tables with hundreds of thousands of rows. I need to
I have MySQL InnoDB table utf-8 encoded. This table has only id and name

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.