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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:57:36+00:00 2026-06-15T07:57:36+00:00

I need to add a new column to a table in MySQL DB (MyISAM

  • 0

I need to add a new column to a table in MySQL DB (MyISAM table) that contains more than 20 Million rows.

The process of adding the column must be in run-time, I mean that the app will still be running and rows will still be inserted and selected while altering the table.

  • How will this affect the running app?
  • How long can it take to perform this change?

How can I do this process safely and without harming the running app?

  • 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-06-15T07:57:37+00:00Added an answer on June 15, 2026 at 7:57 am

    Table is locked while DDL queries are performed. This doesn’t mean that the server doesn’t accept queries on other sessions while locked but they are queued up and probably time out before your ALTER TABLE is done. Depending on factors like hardware, table structure and of course amount of rows (which you said is quite high) the alter will take a while.

    On MySQL 5.5 (faster index creation, innodb), 8-core CPU, chip disks, altering a 5 mil row table with several indexes takes about 15-20 minutes in our case.

    I suggest to create a copy, and alter the copy. You’ll have to replay the data delta after you’re done. Facebook had to deal with this on a way higher level, check this out

    http://m.facebook.com/note.php?note_id=430801045932

    Tho, I can’t promise this would all work safely on the MyISAM Engine

    EDIT:

    Percona created a toolkit which apparently works on all storage engines:

    http://www.mysqlperformanceblog.com/2012/04/05/percona-toolkit-2-1-with-new-online-schema-change-tool/

    With this release we introduce a new version of
    pt-online-schema-change, a tool that enables
    you to ALTER large tables with no blocking or
    downtime. As you know, MySQL locks tables
    for most ALTER operations, but pt-online-
    schema-change performs the ALTER without
    any locking. Client applications can continue
    reading and writing the table with no interruption.

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

Sidebar

Related Questions

I need to add a new column to a large (5m row) django table.
I need to add a new column to a MS SQL 2005 database with
With df <- data.frame(v1=c(1:5), v2=c(9,32,6,17,11)) I need to add a new column v3 with
I need to add default value column in SqlServer Compact....i am new to this
I need add a new user group for mediawiki. The new group has more
I use TCL 8.4 and for that version I need to add a new
Can any one please let me know that, I need to add a column
I have a datatable with lots of rows. I need to add a new
I want to add new column to the existing sales_flat_order table of magento. The
so i have a list where i need to add new values constantly but

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.