当前位置:网站首页>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 】
边栏推荐
- MySQL data table operation DDL & data type
- MySQL splits strings for conditional queries
- 自动化测试生命周期
- Seven ways to achieve vertical centering
- II. Data type
- vscode快捷键
- The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
- Read and understand the rendering mechanism and principle of flutter's three trees
- yolov5目標檢測神經網絡——損失函數計算原理
- Principle of persistence mechanism of redis
猜你喜欢

Mmclassification training custom data
Take you two minutes to quickly master the route and navigation of flutter

Simple production of wechat applet cloud development authorization login

Error modulenotfounderror: no module named 'cv2 aruco‘

Use and install RkNN toolkit Lite2 on itop-3568 development board NPU

Redis master-slave mode

codeforces每日5题(均1700)-第五天

Linux安装部署LAMP(Apache+MySQL+PHP)

【yolov5.yaml解析】

The evolution of mobile cross platform technology
随机推荐
Xi IO flow
查看rancher中debug端口信息,并做IDEA Remote Jvm Debug
Yolov 5 Target Detection Neural Network - Loss Function Calculation Principle
How to clear floating?
Application of a class of identities (vandermond convolution and hypergeometric functions)
One article tells the latest and complete learning materials of flutter
Seven ways to achieve vertical centering
Pytorch weight decay and dropout
Basic operations of MySQL data table, addition, deletion and modification & DML
A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
Sentinel sentinel mechanism of master automatic election in redis master-slave
Yolov5 target detection neural network -- calculation principle of loss function
yolov5目標檢測神經網絡——損失函數計算原理
Get all stock data of big a
Liunx prohibit Ping explain the different usage of traceroute
How can beginners learn flutter efficiently?
Select drop-down box realizes three-level linkage of provinces and cities in China
Tabbar configuration at the bottom of wechat applet
【Win11 多用户同时登录远程桌面配置方法】