当前位置:网站首页>MySQL - 索引的隐藏和删除
MySQL - 索引的隐藏和删除
2022-07-24 10:25:00 【骆驼胡杨】
隐藏索引
MySQL 8开始支持隐藏索引。隐藏索引提供了更人性化的数据库操作。
隐藏索引,顾名思义,让索引暂时不可见,不会被优化器使用。默认情况下索引是可见的。隐藏索引可以用来测试索引的性能。验证索引的必要性时不需要删除索引,可以先将索引隐藏,如果优化器性能无影响就可以真正地删除索引。
ALTER TABLE tablename ALTER INDEX index_name INVISIBLE; #隐藏索引 ALTER TABLE tablename ALTER INDEX index_name VISIBLE; #取消隐藏

隐藏索引
- 所谓删除索引,就是删除表中已经创建的索引。之所以要删除索引,是因为这些索引会降低表的更新速度,影响数据库的性能。
- 在MySQL中删除索引通过SQL语句DROP INDEX来实现,其语法形式如下:
DROP INDEX indexname ON tablename;
修改索引:
- 先删除,后增加
边栏推荐
- fatal: unable to commit credential store: Device or resource busy
- 差分约束系统---1且2--2022年5月27日
- Google Earth engine - QA in Landsat 5 toa dataset_ Pixel and QA_ Radsat band
- Try the video for 5 minutes [easy to understand]
- PostgreSQL rounding
- [recommendation system] the classic technical architecture of the data flow of the recommendation system + the most complete evolution map of the top 10 deep learning CTR models of Microsoft, Alibaba,
- Scan line, weight segment tree
- How does ribbon get the default zoneawareloadbalancer?
- NIO知识点
- Design of dual machine hot standby scheme
猜你喜欢

图模型2--2022-5-13

Dynamic planning: robbing families and houses

ZOJ 2770 differential restraint system -- 2 -- May 20, 2022

Uniapp calendar component
![[STM32 learning] (13) STM32 realizes ultrasonic ranging (hc-sr04)](/img/6e/b7cf7a8e3296e29d61a0626e3793ea.png)
[STM32 learning] (13) STM32 realizes ultrasonic ranging (hc-sr04)

Image processing: rgb565 to rgb888

Will not be rejected! Learn the distributed architecture notes sorted out by Alibaba Daniel in 35 days, with a salary increase of 20K

In depth analysis of common cross end technology stacks of app

Ask you to build a small program server

2022, enterprise informatization construction based on Unified Process Platform refers to thubierv0.1
随机推荐
常量指针、指针常量
A ten thousand word blog post takes you into the pit. Reptiles are a dead end [ten thousand word pictures]
Detailed explanation of uninstalling MySQL completely under Linux
图像处理:浮点数转定点数
fatal: unable to commit credential store: Device or resource busy
zoj1137+作业1--2022年5月28日
Association Rules -- July 10, 2022
NIO知识点
SQL Server 2012 download and installation detailed tutorial
The best time to buy and sell stocks (leetcode-121)
(3) Current situation of low code platform and R & D changes based on it basic components
[leecode] get the longest common substring of two strings
Zoj1137+ operation 1 -- May 28, 2022
[STM32 learning] (22) STM32 realizes 360 degree rotary encoder
Trie tree template 2
What did zoneawareloadbalancer of ribbon and its parent class do?
Home raiding II (leetcode-213)
OSPF includes special area experiments, mGRE construction and re release
Ask you to build a small program server
[STM32 learning] (9) stm32f1 general timer realizes simple breathing lamp