The difference between MySQL database engine MyISAM and InnoDB

  MySQL database has a variety of storage engines: such as: MyISAM, InnoDB, MERGE, MEMORY (HEAP), BDB (BerkeleyDB), EXAMPLE, FEDERATED, ARCHIVE, CSV, BLACKHOLE, etc. The most common ones are MyISAM and InnoDB. The following main Explain the difference between MyISAM and InnoDB two mysql database storage engines.
  The MyISAM engine is a non-transactional engine that provides high-speed storage and retrieval, as well as full-text search capabilities, suitable for applications with frequent queries such as data warehouses. In MyISAM, a table is actually saved as three files, .frm stores table definitions, .MYD stores data, and .MYI stores indexes. MyISAM is supported in all MySQL configurations and is the default storage engine unless you configure MySQL to use another engine by default.
  Other non-transactional storage engines in MySQL Server (such as MyISAM) follow a different data integrity paradigm, called "atomic operations". In transaction terms, MyISAM tables always work efficiently in AUTOCOMMIT=1 mode. Atomic operations often provide comparable integrity and better performance. It is 3 to 5 times faster than the fastest transactional tables that are tuned optimally. Since MySQL Server supports both paradigms, you can decide whether to take advantage of the speed of atomic operations to better serve your application, or use the transactional feature. The selection can be made by table.
  InnoDB is an engine that supports transactions. Provides MySQL with a transaction-safe (ACID compliant) storage engine with commit, rollback, and crash recovery capabilities. All data is stored in one or more data files and supports a locking mechanism similar to Oracle. Generally, it is widely used in OLTP applications. If no InnoDB configuration option is specified, MySQL will create an auto-extending data file named ibdata1 and two log files named ib_logfile0 and ib_logfile1 in the MySQL data directory.
  InnoDB locks at the row level and alsoThe SELECT statement provides an Oracle-style consistent non-locking read. These features increase multi-user deployment and performance. There is no need to expand locks in InnoDB, because row -level locking fits into very small spaces in InnoDB. InnoDB also supports FOREIGN KEY enforcement. In SQL queries, you are free to mix InnoDB type tables with other MySQL table types, even within the same query.
  InnoDB is designed for maximum performance when dealing with huge data volumes. Its CPU efficiency is probably unmatched by any other disk-based relational database engine. The InnoDB storage engine is fully integrated with the MySQL server. The InnoDB storage engine maintains its own buffer pool for caching data and indexes in main memory.
  InnoDB stores its tables & indexes in a tablespace, which can contain several files. InnoDB tables can be of any size, even on operating systems where the file size is limited to 2GB . InnoDB is also included by default in all MySQL 5.1 binary distributions.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325273985&siteId=291194637