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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:44:37+00:00 2026-06-01T22:44:37+00:00

Hi we have a database where 3 to 4 records are read and write

  • 0

Hi we have a database where 3 to 4 records are read and write every second on this particular table on which a new column is to be added. This table has more than 60000 records.
I need to add a new column to this.
MySQL>ALTER TABLE tablename ADD columnname int(1);

What would be the safest way to get this done. Is it possible to get this new column added without stopping the MYSQL server and without losing new records during the update process as I assume it will take quite a long time?

  • 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-01T22:44:39+00:00Added an answer on June 1, 2026 at 10:44 pm

    MySQL documentation (http://dev.mysql.com/doc/refman/5.1/en/alter-table.html) provides the following information:

    “In most cases, ALTER TABLE makes a temporary copy of the original table. MySQL waits for other operations that are modifying the table, then proceeds. It incorporates the alteration into the copy, deletes the original table, and renames the new one. While ALTER TABLE is executing, the original table is readable by other sessions. Updates and writes to the table that begin after the ALTER TABLE operation begins are stalled until the new table is ready, then are automatically redirected to the new table without any failed updates. The temporary table is created in the database directory of the new table.”

    According the documentation there should not be any data loss. But as always, before performing any changes to a live system, check out the same scenario on a test machine.

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

Sidebar

Related Questions

I have a database table A which stores records, A has a primary key
I have a function which calculates distance from database records. This function is called
I have an app which will generate 5 - 10 new database records in
I have situation in which I read a record from a database. And if
I'm pretty new to SQL. I have a database with records based on road/milepoints.
Situation: I have a database that contains sales records, each record has a ID
I have database heavy operations happening, which adds around 10,000 records to my Database.
I have a database with about 10,000 records. Each record has one text field
I have a database with >100K records and I want to get the results
I have a page with 3 layers, one for navigation, one for database records

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.