Common engine and compare mysql database

Innodb engine, the default engine features mysql: 1, InnoDB provides MySQL with a with a commit, rollback, and crash recovery capabilities things safe (ACID compliant) storage engine. InnoDB row-level locking and also provide a SELECT statement similar to 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, even in the same query can also mix 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 locks can not match 2, a row-level locking, and foreign key constraint of 3, InnoDB storage engine is fully integrated with MySQL server, InnoDB storage engine is in main memory cache data and indexes and maintains 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 if the file size is limited to 2GB on the operating system 6, InnoDB InnoDB does not create directories are used in numerous large database sites requiring high performance when using InnoDB, MySQL will be under the MySQL data directory create a 10MB file size is automatically extended data ibdata1 named, and named ib_logfile0 and two 5MB log file size ib_logfile1 4, the number of full-text search does not support 5, will not save the table row. When performing Select count (*) from table instruction, the need to scan the whole table 6, may be utilized data log to recover data 7, data stored in the table, each table stored by primary key sequence stored, if when not displayed when the specified table defines the primary key, InnoDB generates a 6-byte ROWID for each row, and as the primary key 8, or the entire table, InnoDB Is deleted line by line, the efficiency is very slow application scenarios: large-capacity data sets tend to select Innodb. Because it supports transaction processing and fault recovery. Due to the small size of the lock, the lock will not write a full table. So use will increase efficiency at higher degree of concurrency scene. MyIASM engine 1, large files (up to 63 file length) are supported 2 on the support of large file systems and operating systems, does not provide transaction support 3 does not support row-level locking, when performing the Insert and Update to update statements , that is, when a write operation need to lock the table, efficiency will be reduced 4, 2 does not support foreign keys, when the line delete, and update and insert operations when mixed-use, dynamic dimension to produce less debris. This block is deleted by combining adjacent to, and if the next block is removed, it is automatically extended to the next block 3, the maximum number of indexes per MyISAM table 64, which can be changed by recompiling. The maximum number of columns per index is 164, the maximum length of the key is 1000 bytes, which may be changed by the compiler, in the case of the key length of over 250 bytes, a more than 1024-byte key will be to spend 5, BLOB and TEXT columns can be indexed 6, NULL is permitted in the column of the index, representing the value 0 or 1 byte of each key 7, all number key is stored in the high byte first to allow a higher 8 index compression, each table has a type MyISAM AUTO_INCREMENT internal column, INSERT and uPDATE operations when the column is updated, while AUTO_INCREMENT column is refreshed. So, AUTO_INCREMENT MyISAM table type InnoDB type of column is newer than the 9 AUTO_INCREMENT faster, you can put the data files and index files in different directories 10, each character column can have 11 different character sets, there is VARCHAR table can be fixed or dynamic record length 12, VARCHAR and CHAR columns can be up to 64KB create a database using the MyISAM engine, will produce three files. Name of the file to the beginning of the table name, at the extension of the file types: Extended frm file stores the table definition, data file name .MYD (MYData), when the index file extension. MYI (MYIndex) Scenario: Table read much more than write operations, and does not need to support the transaction. MyIASM can be used as the database engine first. MEMORY storage engine MEMORY storage engine to store data in the table into memory, did not refer to other queries and provides quick access to table data. MEMORY The main features are: 1, MEMORY tables each table can have up to 32 indexes, each 16, and the maximum length of 500 bytes of the key 2, and MEMORY storage engine executes HASH miniature BTREE 3, it may be a MEMORY non-unique key value table 4, MEMORY tables use a fixed length record format 5, MEMORY not support BLOB or TEXT column 6, MEMORY AUTO_INCREMENT support column and the column index may comprise a NULL value is 7, MEMORY the table by the sharing between clients (just like any other non-TEMPORARY table) 8, mEMORY table memory is stored in memory, the memory is idle server mEMORY tables and query processing, internal tables created shared 9, when no longer mEMORY table contents when needed, to free the memory used by mEMORY tables, should be executed dELETE FROM or TRUNCATE tABLE, or delete the entire table (using DROP tABLE) application scenarios: if only temporarily stored data, the amount of data, and does not require higher data security, you can choose the data stored in memory memory engine.

The total number of articles from the public, Guangzhou dark horse programmer Center (itheimagz) more resources, please visit

image.png

Guess you like

Origin blog.51cto.com/14360146/2429193