current position:Home>What are the advantages and disadvantages of MySQL index?

What are the advantages and disadvantages of MySQL index?

2022-02-04 16:52:06 Alibaba cloud Q & A

MySQL What are the advantages and disadvantages of the index ?




Take the answer 1:

advantage :

The unique index can ensure the uniqueness of the data in each row of the database table

Index can speed up data query , Reduce query time

shortcoming :

Creating and maintaining indexes takes time

Index needs to occupy physical space , In addition to data tables taking up data space , Each index also takes up a certain amount of physical space

Add the data in the table 、 Delete 、 When we change it , Index also needs dynamic maintenance .


copyright notice
author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/02/202202041652045702.html

Random recommended