当前位置:网站首页>InnoDB, MySQL structure, and the difference between the three kinds of deletion
InnoDB, MySQL structure, and the difference between the three kinds of deletion
2022-07-19 02:32:00 【HYYyyying】
Extract 、 Transferred from a Xiu
1、innodb Why use self increasing id A primary key
Use self increasing id A primary key :
Every time you insert a new record , It will be added to the subsequent positions of the current inode in sequence , When a page is full , Will open a new page
Use non self increasing id A primary key :
Not self increasing id( Student number 、 ID number ), The value of each inserted primary key is approximately random , So every time a new record is inserted into the middle of the existing index page . Frequent movement 、 Paging caused a lot of fragmentation , The index structure is not compact enough , I have to go through OPTIMIZE TABLE To rebuild the table and optimize the page population
2、MySQL structure , Service tier and storage engine tier

contain Service layer and Storage engine layer ,
Service layer :
The connector : Verify user identity , Give authority
The query cache : If there is a cache, it directly returns , If it does not exist, follow-up operations will be performed
analyzer : Yes SQL Do lexical and grammatical analysis
Optimizer : Mainly for the implementation of SQL Optimize and select the best execution scheme
actuator : The actuator will first check whether the user has execution permission , You can use the interface provided by this engine
Storage engine layer :
Responsible for data storage and extraction , Provide read-write interface
3、drop、delete、truncate Common ground and difference of
delete: Delete all or data rows of the table , perform delete after , Users need to submit (commite) To perform the deletion , Or rollback (rollback) To undo the deletion ; Will trigger all of this table delete trigger
truncate: Delete all data in the table , Cannot be rolled back , It will not start the trigger of this table ,truncate Than delete faster , Take up less space
drop: Delete tables from the database , All the data lines 、 Indexes and permissions will be deleted , be-all DML Trigger will not be triggered , Cannot be rolled back
delete and truncate Delete only data
边栏推荐
猜你喜欢

Buaaos-lab0 experimental report

新手如何配置多个 SSH Key(通俗易懂手把手教学)
![[Ruiji takeout ⑩] rough learning of Linux & rough learning of redis](/img/2f/9788ddea24f090d872ccdf82ccd8d8.png)
[Ruiji takeout ⑩] rough learning of Linux & rough learning of redis

Decentralized edge rendering meta universe protocol cadeus was invited to attend the cbaia 2022 summit to enable more Web3 application scenarios with technology

SSTI template injection

深入性能测试数据分析

【Unity编辑器扩展】Unity资产预处理和后处理图片自动转Sprite2D

SSTI模板注入

Jmeter接口测试之响应断言

Unity导入fbx模型后,运行时物体的旋转和位置自动改变的问题解决方法
随机推荐
仅以此篇纪念负数取模
[tools] unity quickly starts to make the artifact tilemap of 2D and 2.5D games
[unity Editor Extension] quickly locate the specified files and paths of resources and scripts
性能测试实施规范指南
Subnet division (see details)
【Unity编辑器扩展】Unity内部Asset资源配置ScriptableObject
status 500 reading AftersaleService#getAftersaleList(Long)+com.sun.proxy.$Proxy214.getAftersaleList
[unity Editor Extension] unity makes its own exclusive editor panel
【瑞吉外卖⑩】Linux 粗略学习 & Redis 粗略学习
《Visual C#从入门到精通》个人学习整理
第2章-系统控制原理 -> 经典控制理论
php伪协议实现命令执行
【Unity编辑器扩展】Unity制作自己的专属的编辑器面板
2022 latest software testing tools
uni app 微信小程序 点餐系统【再来一单】页面跳转
元宇宙公链Caduceus项目详解(一):Caduceus Metaverse Protocol的项目理念及技术框架
Unity3D 游戏人物跳跃落地时发生弹跳,偏移情况的解决方法
[Ruiji takeout ⑩] rough learning of Linux & rough learning of redis
Summary of tree and heap knowledge points
bugku----正则匹配,cookies