当前位置:网站首页>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 to translate professional papers and write English abstracts better
- Windows Server 2016 standard installing Oracle
- P5706 [deep foundation 2. Example 8] redistributing fat house water -- February 13, 2022
- Today's summer solstice
- AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘/home/yolov5/models/comm
- 我的创作纪念日
- [brush questions] how can we correctly meet the interview?
- Day 246/300 SSH connection prompt "remote host identification has changed!"
- Day 248/300 关于毕业生如何找工作的思考
- 【服务器数据恢复】IBM服务器raid5两块硬盘离线数据恢复案例
猜你喜欢
[ 英语 ] 语法重塑 之 英语学习的核心框架 —— 英语兔学习笔记(1)
My seven years with NLP
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
电子书-CHM-上线CS
AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models. common‘ from ‘/home/yolov5/models/comm
How much is it to translate Chinese into English for one minute?
26岁从财务转行软件测试,4年沉淀我已经是25k的测开工程师...
Fedora/rehl installation semanage
AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘/home/yolov5/models/comm
随机推荐
librosa音频处理教程
中青看点阅读新闻
Day 245/300 JS forEach 多层嵌套后数据无法更新到对象中
Basic commands of MySQL
What are the commonly used English words and sentences about COVID-19?
GET 和 POST 请求类型的区别
漏了监控:Zabbix对Eureka instance状态监控
万丈高楼平地起,每个API皆根基
Biomedical English contract translation, characteristics of Vocabulary Translation
SSO流程分析
[ 英语 ] 语法重塑 之 英语学习的核心框架 —— 英语兔学习笔记(1)
Simple query cost estimation
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
E-book CHM online CS
Day 239/300 注册密码长度为8~14个字母数字以及标点符号至少包含2种校验
Entity Developer数据库应用程序的开发
Office-DOC加载宏-上线CS
LeetCode每日一题(1997. First Day Where You Have Been in All the Rooms)
[hot100] 739. Température quotidienne
How to translate biomedical instructions in English