mysql 数据库引擎
Alternative Storage Engines
Table of Contents
- 15.1 Setting the Storage Engine
- 15.2 The MyISAM Storage Engine
- 15.3 The MEMORY Storage Engine
- 15.4 The CSV Storage Engine
- 15.5 The ARCHIVE Storage Engine
- 15.6 The BLACKHOLE Storage Engine
- 15.7 The MERGE Storage Engine
- 15.8 The FEDERATED Storage Engine
- 15.9 The EXAMPLE Storage Engine
- 15.10 Other Storage Engines
- 15.11 Overview of MySQL Storage Engine Architecture
Storage engines are MySQL components that handle the SQL operations for different table types. InnoDB
is the default and most general-purpose storage engine, and Oracle recommends using it for tables except for specialized use cases. (The CREATE TABLE
statement in MySQL 5.7 creates InnoDB
tables by default.)
MySQL Server uses a pluggable storage engine architecture that enables storage engines to be loaded into and unloaded from a running MySQL server.
To determine which storage engines your server supports, use the SHOW ENGINES
statement. The value in the Support
column indicates whether an engine can be used. A value of YES
, NO
, or DEFAULT
indicates that an engine is available, not available, or available and currently set as the default storage engine.
mysql> SHOW ENGINES\G
*************************** 1. row ***************************
Engine: PERFORMANCE_SCHEMA
Support: YES
Comment: Performance Schema
Transactions: NO
XA: NO
Savepoints: NO
*************************** 2. row ***************************
Engine: InnoDB
Support: DEFAULT
Comment: Supports transactions, row-level locking, and foreign keys
Transactions: YES
XA: YES
Savepoints: YES
*************************** 3. row ***************************
Engine: MRG_MYISAM
Support: YES
Comment: Collection of identical MyISAM tables
Transactions: NO
XA: NO
Savepoints: NO
*************************** 4. row ***************************
Engine: BLACKHOLE
Support: YES
Comment: /dev/null storage engine (anything you write to it disappears)
Transactions: NO
XA: NO
Savepoints