当前位置:网站首页>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;
修改索引:
- 先删除,后增加
边栏推荐
- MySQL - lock
- [STM32 learning] (10) stm32f1 general timer realizes pulse counter
- Golang migrate is easy to use
- Aggregate log server
- 给你的网站加一个爱发电角标
- [electronic device note 4] inductance parameters and type selection
- ES6 question
- 常量指针、指针常量
- Record AP and map calculation examples
- Constant pointer, pointer constant
猜你喜欢
![[electronic device note 4] inductance parameters and type selection](/img/b1/6c5cb27903bc1093bf49e278e31353.png)
[electronic device note 4] inductance parameters and type selection
![[STM32 learning] (6) use of serial port 1 (usart1)](/img/b1/430d3501a99e46958c066f7fd7eee9.png)
[STM32 learning] (6) use of serial port 1 (usart1)

MySQL——锁

Curse of knowledge

MySQL - lock

OSPF includes special area experiments, mGRE construction and re release

Simply use golang SQLC to generate MySQL query code

The paper of gaojingjian center was selected into the ACL 2022 of the international summit to further expand the privacy computing capacity of Chang'an chain

Create a vertical seekbar from scratch

Mysql database JDBC programming
随机推荐
Dynamic planning: robbing families and houses
Basic SQL operations
MySQL - lock
Dr. water 3
Analysis of Kube proxy IPVS mode
Curse of knowledge
zoj 2770 差分约束系统---2--2022年5月20日
Jenkins deploys the project and prompts that the module package defined by him cannot be found
JMeter setting default startup Chinese
Interpretation of websocket protocol -rfc6455
The concept and representation of a tree
SMTP automatic mail sending function code
第五章 修改实现(IMPL)类
Image processing: floating point number to fixed point number
Value on the object Z rotation synchronization panel in unity
Selnium checks three conditions when it cannot locate an element
Chapter V Modification implementation (impl) class
Trie tree template 2
Erlang studies abroad
Review of new services and functions of Amazon cloud technology in June 2022