Why are database indexes not recommended?

Indexing is a very important database optimization method that can improve query speed. But there are also some negative effects

1. The index will take up storage space: for a large database, the storage space occupied by the index will be quite large, which will increase the storage cost of the database.
2. Indexes will increase the overhead of write operations: When data is written to the database, if there are multiple indexes on the table where the data resides, these indexes also need to be updated, which will bring additional write operation overhead.
3. The index may reduce the performance of write operations: Since the index needs to be updated, in the case of high concurrent write operations, frequent index updates will reduce the database write performance.

In short, whether to use the index depends on the actual situation.

Guess you like

Origin blog.csdn.net/qq_45800977/article/details/130152041