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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:26:49+00:00 2026-05-26T08:26:49+00:00

I have a MyIsam table about 15Gb large. I have deleted about a half

  • 0

I have a MyIsam table about 15Gb large.
I have deleted about a half of the rows from it and the delete query took about 10 hours.
Now I’m afraid to start optimize table, because I don’t know how long it’s gonna take.
If you have an experience with such large tables, can you please share with me.

PS After the deletion process the query “select * from table limit 0,30” takes years.
Will optimize table help?

Will it take more than 10 hours?

What’s gonna happen, if I interrupt the “optimize table” query?

  • 1 1 Answer
  • 1 View
  • 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-26T08:26:50+00:00Added an answer on May 26, 2026 at 8:26 am

    To optimize the table will help to reduce the size (index will be recalculated etc.)
    If you deleted half of the rows, you should optmize your table. In my company we have tables about 2-3 gb. Optmize doesn’t take so much like delete.

    If you want that your queries will be faster, optimize your table.


    Another hint for deleting many many rows from a large table:
    You can do it without using any delete command.

    Select the rows not to be deleted into an empty table that has the same structure as the original table:

    INSERT INTO t_copy SELECT * FROM t WHERE … ;

    Use RENAME TABLE to atomically move the original table out of the way and rename the copy to the original name:

    RENAME TABLE t TO t_old, t_copy TO t;

    Drop the original table:

    DROP TABLE t_old;

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

Sidebar

Related Questions

I have a MySQL MyISAM table with about 400 million rows of price data
I have a mysql MyISAM table with many rows that contain information about places,
I have a large MyISAM table. It's approaching 1 million rows. It's basically a
I have a MyISAM table with more than 10^7 rows. When adding data to
Say you have a MySQL 5.0 MyISAM table with 100 million rows, with one
I have table with 300 000 records (MyISAM). I get record from this table
I have a MySQL table with about 2 million rows, and a script that
I'm switching a large table to InnoDB from myISAM. There has been a lot
I have a table (MySQL 5.1, InnoDB) with about 3M rows, 98% of them
In a mysql MyISAM table, I have a column type mediumblob and storing captured

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.