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

  • Home
  • SEARCH
  • 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 8109603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:28:31+00:00 2026-06-06T01:28:31+00:00

I need a way to update tables on live machine without affecting users experience.

  • 0

I need a way to update tables on live machine without affecting users experience.

I have few tables on MyISAM engine which are being updated every 15 minutes. Update script just truncates table and inserts data from select sentence. Problem appears then user tries to view information from table which is being updated – user experience lags, uncorrect information is being shown.

It would be easy to do with InnoDB transactions, but what about MyISAM?

  • 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-06T01:28:32+00:00Added an answer on June 6, 2026 at 1:28 am

    You might try this kind of thing if you MUST use myISAM. You need to be at version 5.0 or higher. If you’re not, upgrade.

    1. Create a new table with a temporary name
    2. Populate the new table (this is the time-consuming operation)
    3. Lock your production table.
    4. Rename the production table to something else.
    5. Rename your temporary table to the name used for your production table.
    6. Unlock the production table.
    7. Drop the old production table (or do something else to re-use the disk space).

    If you can make the software you’re using to read this resilient to a SQL error that complains about a missing table, and simply have it try again after a second or so, you can skip the locking and unlocking steps. But those steps protect your system from the brief moment, during the renaming shuffle where there’s no table with the correct name for the production table.

    This is monkey business, and takes a bit of debugging. But it has worked very well for me.

    (I define “monkey business” to be stuff outside the scope of pure, elegant, SQL.)

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

Sidebar

Related Questions

I have two tables, Users and TempUsers and I need to do operations on
I have a two tables (actually sets of tables) which may need to be
I have two different databases where I need to connect and update the tables
What is a correct way to update model when view changed. Is it need
I need a way to convert .doc or .docx extensions to .txt without installing
I need a way to insert new articles straight into my MediaWiki database without
I need to update some rows of the tables and then display these rows.
I have a case where I need to update the title of a jQuery
I have two already-existing tables which look (in part) roughly like this: CREATE TABLE
I have an excel spread sheet (well, hundreds of them) which I need importing

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.