In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces whether the index in mysql can be deleted, the article is very detailed, has a certain reference value, interested friends must read it!
The index in mysql can be deleted, and the index can be deleted using the "DROP INDEX" statement in the syntax format "DROP INDEX ON". Unused indexes are recommended for deletion because they slow down the update speed of the table and affect the performance of the database.
To delete an index is to delete an index that already exists in the table. Unused indexes are recommended for deletion because they slow down the update speed of the table and affect the performance of the database. For such an index, it should be deleted.
Basic grammar
When the index is no longer needed, you can use the DROP INDEX statement to delete the index.
Syntax format:
DROP INDEX ON
The syntax is as follows:
The name of the index to delete
Specifies the name of the table in which the index is located
Example:
Delete the index in the table tb_stu_info, and enter the SQL statement and the execution result as shown below.
Mysql > DROP INDEX height-> ON tb_stu_info Query OK, 0 rows affected (0.27 sec) Records: 0 Duplicates: 0 Warnings: 0mysql > SHOW CREATE TABLE tb_stu_info\ Graph * 1. Row * * Table: tb_stu_infoCreate Table: CREATE TABLE `tb_stu_ info` (`id`int (11) NOT NULL, `name` char (45) DEFAULT NULL `dept_ id` int (11) DEFAULT NULL, `age` int (11) DEFAULT NULL, `height` int (11) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=gb23121 row in set (above 0.00 sec are all the contents that can be deleted by the index in mysql Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.