In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This problem occurs when DELETE is followed by a condition.
Delete from table_name where condition
The size of the space occupied by the data table does not change after the data is deleted.
When you delete directly without following the conditions.
Delete from table_name
The data is cleared, and the space of the data table becomes 0
If a large portion of the table data has been deleted, or if many changes and variable length table rows (VARCHAR table, VARBINARY, BLOB, or text columns) have been changed, this is due to fragmentation in the data file after the delete operation. DELETE only deletes the data identity bits and does not collate the data files. When new data is inserted, the record space set to delete identification is used again. OPTIMIZE TABLE can be used to reclaim the unused space and defragment the data files.
OPTIMIZE TABLE only works on MyISAM, BDB, and InnoDB tables.
OPTIMIZE TABLE table name
For the myisam engine, using optimize table also has the following features:
If the table has deleted or split rows, repair the table. [repair table]
If the index pages are not sorted, sort them. [index not sorted, will be sorted]
If the table's statistics are not up to date (and the repair could not be accomplished by sorting the index), update them. [if the statistics of the table are not up to date, update it]
After the batch deletion of the myiam data table, it is found that the space is not reclaimed, and the space should be recycled through optimize table.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.