当前位置:网站首页>Briefly describe the differences between indexes, primary keys, unique indexes, and joint indexes in mysql, and how they affect the performance of the database (in terms of reading and writing)
Briefly describe the differences between indexes, primary keys, unique indexes, and joint indexes in mysql, and how they affect the performance of the database (in terms of reading and writing)
2022-07-06 06:51:00 【CHENFENG Muyang】
1. Preface
A brief description MySQL in , Indexes , Primary key , unique index , Joint index The difference between , What is the impact on the performance of the database ( From reading and writing )
This is a very classic MySQL Index interview questions , It is intended to see whether the interviewer understands several types of indexes, as well as the advantages and disadvantages of indexes
2. The difference between several index types
Index is a kind of data structure that helps database get data efficiently , The index file records the reference pointer to the data of the data table
A primary key is a special unique index , There can only be one primary key index in a table , The primary key index is used to uniquely identify a record
A unique index is used to ensure that a column contains only different values , in other words , Unique index can ensure the uniqueness of data records
A federated index is an index built through multiple columns , Such as the : Union primary key index , Union unique index
3. The impact of index reading and writing on database performance
read : Indexing can greatly improve the speed of data query , The index file will be generated after indexing , So essentially, indexing is space for time .
Write : The index lowers the insertion rate , Delete , The speed of updates , Because when the data changes , Will re index , Then the index file will be rebuilt , As a result, the operation of adding, deleting and modifying becomes slower
边栏推荐
- How much is it to translate Chinese into English for one minute?
- MySQL5.72. MSI installation failed
- Changes in the number of words in English papers translated into Chinese
- Reflex WMS中阶系列3:显示已发货可换组
- Classification des verbes reconstruits grammaticalement - - English Rabbit Learning notes (2)
- CS passed (cdn+ certificate) PowerShell online detailed version
- Day 248/300 关于毕业生如何找工作的思考
- In English translation of papers, how to do a good translation?
- L'Ia dans les nuages rend la recherche géoscientifique plus facile
- pymongo获取一列数据
猜你喜欢

19.段页结合的实际内存管理

SQL Server manager studio(SSMS)安装教程

How to do a good job in financial literature translation?

How much is it to translate Chinese into English for one minute?

C语言_双创建、前插,尾插,遍历,删除

On the first day of clock in, click to open a surprise, and the switch statement is explained in detail

In English translation of papers, how to do a good translation?

漏了监控:Zabbix对Eureka instance状态监控

18.多级页表与快表

SQL Server Manager studio (SSMS) installation tutorial
随机推荐
Office doc add in - Online CS
Market segmentation of supermarket customers based on purchase behavior data (RFM model)
Erreur de type résolue avec succès: type de données « catégorie» non sous - jacente
C语言_双创建、前插,尾插,遍历,删除
简单描述 MySQL 中,索引,主键,唯一索引,联合索引 的区别,对数据库的性能有什么影响(从读写两方面)
L'Ia dans les nuages rend la recherche géoscientifique plus facile
Number of query fields
19.段页结合的实际内存管理
我的创作纪念日
Is it difficult for girls to learn software testing? The threshold for entry is low, and learning is relatively simple
因高额网络费用,Arbitrum 奥德赛活动暂停,Nitro 发行迫在眉睫
[advanced software testing step 1] basic knowledge of automated testing
Day 239/300 注册密码长度为8~14个字母数字以及标点符号至少包含2种校验
AI on the cloud makes earth science research easier
编译,连接 -- 笔记 -2
[English] Verb Classification of grammatical reconstruction -- English rabbit learning notes (2)
LeetCode每日一题(1870. Minimum Speed to Arrive on Time)
CS certificate fingerprint modification
AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models. common‘ from ‘/home/yolov5/models/comm
指尖上的 NFT|在 G2 上评价 Ambire,有机会获得限量版收藏品