av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術(shù)文章
文章詳情頁

mysql索引 - MySQL:索引是否需要整理維護(hù)?

瀏覽:137日期:2022-06-16 09:52:41

問題描述

每月定期需要對數(shù)據(jù)進(jìn)行大量的刪除操作,想請教這樣操作后對索引是否有影響,是否需要在刪除操作完成后對索引進(jìn)行更新之類的操作

如果需要的話這方面的內(nèi)容搜索哪些關(guān)鍵字呢?

問題解答

回答1:

可以使用OPTIMIZE定期優(yōu)化表,每個星期或者每個月一次,具體可以參考下面鏈接http://dev.mysql.com/doc/refm...

摘自官網(wǎng)的描述

Use OPTIMIZE TABLE in these cases, depending on the type of table:

After doing substantial insert, update, or delete operations on anInnoDB table that has its own .ibd file because it was created withthe innodb_file_per_table option enabled. The table and indexes arereorganized, and disk space can be reclaimed for use by the operatingsystem.

After doing substantial insert, update, or delete operations oncolumns that are part of a FULLTEXT index in an InnoDB table. Set theconfiguration option innodb_optimize_fulltext_only=1 first. To keepthe index maintenance period to a reasonable time, set theinnodb_ft_num_word_optimize option to specify how many words to updatein the search index, and run a sequence of OPTIMIZE TABLE statementsuntil the search index is fully updated.

After deleting a large part of a MyISAM or ARCHIVE table, or makingmany changes to a MyISAM or ARCHIVE table with variable-length rows(tables that have VARCHAR, VARBINARY, BLOB, or TEXT columns). Deletedrows are maintained in a linked list and subsequent INSERT operationsreuse old row positions. You can use OPTIMIZE TABLE to reclaim theunused space and to defragment the data file. After extensive changesto a table, this statement may also improve performance of statementsthat use the table, sometimes significantly.

相關(guān)文章:
主站蜘蛛池模板: 日韩精品一区二区在线观看 | 一区二区视频免费观看 | 精品在线看 | 精品少妇v888av | 天天久久| 久在草 | 九九99九九精彩46 | 亚洲成人自拍 | 伊人超碰在线 | 日韩一区二区三区在线 | 免费在线看黄 | 资源首页二三区 | 欧美美女爱爱 | aaaaaaa片毛片免费观看 | 国产精品亚洲精品 | 国产一区视频在线 | 日韩成人在线播放 | 在线中文字幕av | 久草中文在线 | 亚洲成人福利视频 | 久久亚洲春色中文字幕久久久 | 精品欧美一区二区在线观看视频 | 欧美一区二区三区在线 | 天天干狠狠操 | 在线观看国产精品视频 | 伊人超碰| 成人免费视频久久 | 午夜爽爽爽男女免费观看 | 人人九九精| 午夜成人免费视频 | 九九综合 | 免费观看毛片 | 精品久久久久香蕉网 | 午夜精品一区二区三区在线观看 | 日韩欧美在线一区 | 亚洲国产高清免费 | 久久99国产精一区二区三区 | 国产精品久久久免费 | 欧美日韩精品中文字幕 | 免费观看一级视频 | www.黄色片视频 |