Indexes in mysql can be deleted. You can use the "DROP INDEX" statement to delete the index. The syntax format is "DROP INDEX 05b74401f89284067f69c0b2d020259f ON 84b97b20546528f984f83615cb123534" . It is recommended to delete unused indexes because they will slow down the update speed of the table and affect the performance of the database.
(Recommended tutorial: mysql video tutorial)
Deleting an index means to delete the table Delete existing indexes. It is recommended to delete unused indexes because they will slow down the update speed of the table and affect the performance of the database. For such an index, it should be deleted.
Basic syntax
When the index is no longer needed, you can use the DROP INDEX statement to delete the index.
Grammar format:
DROP INDEX <索引名> ON <表名>
The syntax description is as follows:
Example:
Delete the index in the table tb_stu_info. The input SQL statement and execution results are as follows.
mysql> DROP INDEX height
-> ON tb_stu_info;
Query OK, 0 rows affected (0.27 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> SHOW CREATE TABLE tb_stu_info\G
*************************** 1. row ***************************
Table: tb_stu_info
Create 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=gb2312
1 row in set (0.00 sec
The above is the detailed content of Can indexes be deleted in mysql?. For more information, please follow other related articles on the PHP Chinese website!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn