当前位置:网站首页>MySQL storage engine
MySQL storage engine
2022-07-05 12:13:00 【ziyi813】
MySQL Storage engine for
Concept
Database storage engine is the bottom layer of database , Database management system uses data engine to create 、 Inquire about 、 Update and delete data
Different storage engines provide different storage mechanisms 、 Indexing mechanism , Locking mechanism .MySQL The core is the storage engine .
Users can choose different storage engines for data tables according to different requirements .
-- see MySQL All execution engines , The default engine is innoDB, Row level locking and foreign keys
-- The way 1
show engines
-- The way 2
show variables like 'have%';

MySQL In support of 9 Storage engine , The default engine is InnoDB
Field parameter interpretation :
Engine The parameter represents the name of the storage engine
Support parameter MySQL Whether the database management system supports the storage engine
Comment Parameters represent comments about the storage engine
Transactions Parameter indicates whether the storage engine supports transactions
XA Parameter indicates whether the distributed supported by the storage engine is consistent with XA standard
Savepoints Parameter indicates whether the storage engine supports savepoints in transaction processing
Operate the default engine
-- Query the storage engine supported by the current database
show engines;
-- View the current default storage engine
-- Mode one :
adopt `show engines`,Support Field is default Is the default engine
-- Mode two :
show variables like '%storage_engine%';
-- View table engine (ENGINE= The following value is the current storage engine )
show create table table_name;
-- Specify the storage engine when creating a new table
create table (...) engine = MyISAM;
Modify the storage engine
modify MySQL The default storage engine of the database system :
open my.ini The configuration file , find default-storage-engine = INNODB
Change to the name of the engine you want to change , Need to restart mysql The service will take effect .
Modify the database table storage engine
alter table table_name engine = INNODB;
alter table table_name engine = MyISAM;
Select storage engine
Each storage engine has its own characteristics 、 Advantages and application scenarios .
Common storage engine characteristics table
| characteristic | MyISAM | InnoDB | MEMORY |
|---|---|---|---|
| Storage limits | Yes | 64TB | Yes |
| Transaction security | I won't support it | Support | I won't support it |
| Locking mechanism | Table locks | Row lock | Table locks |
| B Tree index | Support | Support | Support |
| Hash index | I won't support it | I won't support it | Support |
| Full-text index | Support | I won't support it | I won't support it |
| Cluster index | I won't support it | Support | I won't support it |
| Data caching | Support | Support | |
| The index buffer | Support | Support | Support |
| Data can be compressed | Support | I won't support it | I won't support it |
| Space use | low | high | N/A |
| Memory usage | low | high | secondary |
| Batch insertion speed | high | low | high |
| Support foreign keys | I won't support it | Support | I won't support it |
- MyISAM, Because the engine does not support transactions , Foreign keys are also not supported , So the access speed is relatively fast , It is applicable to scenarios that do not require transaction integrity .
- InnoDB, Support transactions , Submit with , Rollback and crash recovery , Than MyISAM Take up more disk space
- MEMORY, The storage engine uses memory to store data , So this engine is fast , But there is no security ,【 It would have used redis Other memory types NOSQL Database replacement 】
边栏推荐
- Mongodb replica set
- Proof of the thinking of Hanoi Tower problem
- One article tells the latest and complete learning materials of flutter
- 多表操作-子查询
- Codeforces Round #804 (Div. 2)
- ABAP table lookup program
- July Huaqing learning-1
- Hash tag usage in redis cluster
- pytorch-多层感知机MLP
- Flutter2 heavy release supports web and desktop applications
猜你喜欢

嵌入式软件架构设计-消息交互

Error modulenotfounderror: no module named 'cv2 aruco‘

【yolov5.yaml解析】
![[deploy pytoch project through onnx using tensorrt]](/img/b6/ec95f028f749753666c7877134ad70.png)
[deploy pytoch project through onnx using tensorrt]

无线WIFI学习型8路发射遥控模块

Principle of redis cluster mode

Matlab boundarymask function (find the boundary of the divided area)

How to clear floating?

Intern position selection and simplified career development planning in Internet companies

Matlab imoverlay function (burn binary mask into two-dimensional image)
随机推荐
MVVM framework part I lifecycle
Vscode shortcut key
mmclassification 训练自定义数据
Design of music box based on assembly language
Redis cluster (master-slave) brain crack and solution
【使用TensorRT通过ONNX部署Pytorch项目】
【pytorch 修改预训练模型:实测加载预训练模型与模型随机初始化差别不大】
Video networkstate property
pytorch-多层感知机MLP
Select drop-down box realizes three-level linkage of provinces and cities in China
2022年国内云管平台厂商哪家好?为什么?
Time tools
你做自动化测试为什么总是失败?
[configuration method of win11 multi-user simultaneous login remote desktop]
7月华清学习-1
Application of a class of identities (vandermond convolution and hypergeometric functions)
abap查表程序
Mongodb replica set
语义分割实验:Unet网络/MSRC2数据集
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署