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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:07:06+00:00 2026-06-04T20:07:06+00:00

I have a very big MySQL table (millions of rows) that gets new data

  • 0

I have a very big MySQL table (millions of rows) that gets new data very 20 minutes. I did a mistake at first and have a timestamp data, while what I really wanted was a datetime column. How can I either eidt the current table or migrate it to a new one, as fast as possible WHILE still being able to append new data to either the old or the new table ?

  • 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-04T20:07:08+00:00Added an answer on June 4, 2026 at 8:07 pm

    That rather depends on what/who is using the database, and what control you have…

    One approach might be to:

    • create a new table (with desired data structure) (CREATE TABLE...)
    • amend code/processes that are writing to the database, so that they write to both the old and the new tables (but continue to read from the old table)
    • when everything is writing to both, copy the old data from the old table to new table (INSERT ... SELECT ...)
    • amend code/processes that are reading from the database so that they read from the new table (but continue to write to both)
    • when everything is reading from the new table, amend the code/processes to only write to the new table
    • when everything is reading from and writing to the new table (alone), you can delete the old table. (DROP TABLE...)

    You could also do something similar with by altering the existing tables (i.e. creating a new column), but if your data is updating every 20 mins, you may have a very large table, in which case the ALTER TABLE query could take a while to run – so I’d recommend migrating to a new table instead.

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

Sidebar

Related Questions

I have a very big table of measurement data in MySQL and I need
I have a large mysql MyISAM table with 1.5mil rows and 4.5GB big, still
lets say i have very big table ( many rows) and i have this
I have a very big constant array that is initialized at compile time. typedef
I have an element which may contain very big amounts of data, but I
I have a piece of code that load a very big image in memory.
I am setting up a very small MySQL database that stores, first name, last
I have a very large database (with new information being added everyday) that a
I have a relatively big MySQL InnoDB table (compressed), and I sometimes need to
I am very new to Linux and it seems I made a big mistake

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.