当前位置:网站首页>[database] index
[database] index
2022-07-25 21:28:00 【Master Hao】
Indexing speeds up queries . But the index should be maintained automatically when updating .
Index , It is equivalent to establishing a catalogue for books 

The essential difference between primary keys and unique keys is that primary keys are not accepted NULL value , Within the unique key constraint NULL value .
Generally, cluster indexes are automatically created in the primary key column . Data is stored in clustered index order , There can only be one . There can be multiple unique indexes . Often query columns , Index can be created .

By creating an index , In the process of query , Improve system performance
By creating a unique index , It can maintain the uniqueness of each row of data in the database table
When using grouping and sorting clauses for data retrieval , It can reduce the time of grouping and sorting in queries
Creating and maintaining indexes takes time , And the time increases with the amount of data
Indexes need to take up physical space , If you want to build a clustered index , More space is needed
It takes more time to add, delete and modify the data in the table , Because indexes have to be maintained dynamically
scene :
Often need to search on the column
On the column as the primary key
Often used on linked columns , These columns are mainly some foreign keys , Can speed up the connection
Often need to search by range on the column
Often need to sort on the column
Often used in where In the column above clause
边栏推荐
- Per capita Swiss number series, Swiss number 4 generation JS reverse analysis
- Airtest解决“自动装包”过程中需要输入密码的问题(同适用于随机弹框处理)
- sqlx库使用
- An interview question about interface and implementation in golang
- Interface testing tool restlet client
- On Web Performance Optimization (1)
- CNN structural design skills: taking into account speed accuracy and engineering implementation
- 黑盒(功能)测试基本方法
- Byte side: can TCP and UDP use the same port?
- Sum of two numbers and three numbers
猜你喜欢

strcpy()

两数,三数之和

Record the transfer of domain names from Alibaba cloud service providers to Huawei cloud

The onnx model is exported as a TRT model

Apple estimates that iPhone will give up the Chinese market, and the Chinese industrial chain needs to consider living a hard life

Airtest solves the problem that a password needs to be entered in the process of "automatic packaging" (the same applies to random bullet frame processing)

Detailed explanation of JVM memory model and structure (five model diagrams)

Cesium 多边形渐变色纹理(Canvas)

Huawei occupies half of the folding mobile phone market, proving its irreplaceable position in the high-end market

Decompile app
随机推荐
Niuke-top101-bm38
腾讯云数据库的可信可控之路
有哪些优化mysql索引的方式请举例(sqlserver索引优化)
Sentinel vs Hystrix 限流对比,到底怎么选?
黑盒(功能)测试基本方法
Detailed explanation of Ag search tool parameters
Golang language quickly get started to comprehensive practical notes (go language, beego framework, high concurrency chat room, crawler)
Focus on data | Haitai Fangyuan directly hits the construction idea of data security governance in the securities industry
A detailed explanation of SCP command
cv图像翻转,EmguCV图像旋转「建议收藏」
As a test, how to understand thread synchronization and asynchrony
测试用例和缺陷报告模板
2022 latest examination questions and answers of eight members (standard staff) of Shanghai Architecture
作为测试,如何理解线程同步异步
DDD go practice
图片怎么存储到数据库里「建议收藏」
Cesium 多边形渐变色纹理(Canvas)
sqlx库使用
如何自动生成短链?如何在线批量生成带UTM参数的链接?
pyqt5使用pyqtgraph绘制多个Y值散点图