Commonly used in MySQL storage engine (MyISAM and InnoDB)

   Database storage engine is the underlying software component database, database management systems (DBMS) using a storage engine to create, query, update, and delete data operations. Different storage engines provide different storage mechanism, indexing techniques, lock level and other functions, the use of different storage engines, you can also obtain a specific function. Many database management systems support a variety of different storage engines. MySQL storage engine is the core.

Use SHOW ENGINES; command to see the MySQL storage engine support, Support column indicates whether or not some kind of engine can be used, YES represents, NO not represent, DEFAULT indicates that the current default storage engine.

mysql> SHOW ENGINES;
+--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                                          | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
| CSV                | YES     | Stores tables as CSV files                                                       | NO           | NO   | NO         |
| MRG_MyISAM         | YES     | Collection of identical MyISAM tables                                            | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                        | NO           | NO   | NO         |
| MyISAM             | YES     | Non-transactional engine with good performance and small data footprint          | NO           | NO   | NO         |
| SEQUENCE           | YES     | Generated tables filled with sequential values                                   | YES          | NO   | YES        |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables | YES          | YES  | YES        |
| Aria               | YES     | Crash-safe tables with MyISAM heritage                                           | NO           | NO   | NO         |
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                                               | NO           | NO   | NO         |
+--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.01 sec)

 

InnoDB storage engine:

InnoDB transactional database engine of choice, supporting transaction-safe tables (ACID), supports locking and foreign keys.

Features:   
1. InnoDB provides MySQL with a with a commit, rollback, and crash recovery transaction-safe storage engine capacity. InnoDB row-level locking and also provide a SELECT statement similar to Oracle's non-locking read. These features increase performance and user deployment, even in the same query can also be mixed.   2. InnoDB is designed to handle huge amounts of data designed for maximum performance. Its CPU efficiency is probably any other disk-based relational database engine can not match.   3. InnoDB storage engine is fully integrated with MySQL server, it is cached data in the main memory and the index to maintain its own buffer pool. InnoDB tables and indexes it exists in a logical space, table space can contain several files.   4. InnoDB support foreign keys integrity constraint   5. InnoDB is used in numerous large database sites requiring high performance.

6. Provide having to submit to MySQL, rollback, and crash recovery capabilities things safe (ACID compliant) storage engine. InnoDB row-level locking and also SELECTstatement provides a similar Oracle's non-locking read. These features increase multi-user deployment and performance. In SQL queries, free to InnoDB type tables and other MySQL table types mixed together, can even be mixed in the same query

    7. InnoDB storage engine for the cache data in the main memory and index maintain its own buffer pool. InnoDB tables and indexes it in a logical table space, table space can contain a number of files (or original disk file). This is different from MyISAM table, such MyISAM tables each table is stored in separate files. InnoDB tables can be any size, even when the file size is limited to the operating system 2GB

    8. InnoDB support foreign keys integrity constraints, data stored in the table, each table stored in primary key sequence are stored, is not displayed if the primary key is specified at the table definition, InnoDB generates a 6-byte for each row ROWID and use it as the primary key

 
 

    Using the  InnoDB storage engine  MySQL will create a directory named in the data  ibdata1 of the size of 10MB automatic extension of data files, as well as two named ib_logfile0and ib_logfile1the log file size 5MB

Guess you like

Origin www.cnblogs.com/iceliu/p/11563061.html