Skip to content
CS Chetan Patil
About Projects Blog Gallery Contact
Resume
  1. Home
  2. Blog
  3. MySQL

MySQL 6 July 2016 · 3 min read

MySQL Table Types, or Storage Engines

It is essential to understand the features of each table type in MySQL so that you can use them effectively to maximise the performance of your databases. MySQL provides various storage engines for its tables as below: MyISAM InnoDB MERGE MEMORY (HEAP)…

Chetan S. Patil Software Engineer at Genpact
On this page
  1. MyISAM
  2. InnoDB
  3. MERGE
  4. Memory
  5. Archive
  6. CSV
  7. FEDERATED

It is essential to understand the features of each table type in MySQL so that you can use them effectively to maximise the performance of your databases.

MySQL provides various storage engines for its tables as below:

  • MyISAM
  • InnoDB
  • MERGE
  • MEMORY (HEAP)
  • ARCHIVE
  • CSV
  • FEDERATED

Each storage engine has its own advantages and disadvantages. It is crucial to understand each storage engine features and choose the most appropriate one for your tables to maximize the performance of the database.

MyISAM #

The MyISAM tables are optimised for compression and speed. MyISAM tables are also portable between platforms and operating systems.

The size of MyISAM table can be up to 256TB, which is huge. In addition, MyISAM tables can be compressed into read-only tables to save spaces. At startup, MySQL checks MyISAM tables for corruption and even repairs them in a case of errors. The MyISAM tables are not transaction-safe.

Before MySQL version 5.5, MyISAM is the default storage engine when you create a table without specifying the storage engine explicitly. From version 5.5, MySQL uses InnoDB as the default storage engine.

InnoDB #

The InnoDB tables fully support ACID-compliant and transactions. They are also optimal for performance. InnoDB table supports foreign keys, commit, rollback, roll-forward operations. The size of an InnoDB table can be up to 64TB.

Like MyISAM, the InnoDB tables are portable between different platforms and operating systems. MySQL also checks and repairs InnoDB tables, if necessary, at startup.

MERGE #

A MERGE table is a virtual table that combines multiple MyISAM tables that have a similar structure into one table. The MERGE storage engine is also known as the MRG_MyISAM engine. The MERGE table does not have its own indexes, it uses indexes of the component tables instead.

Using MERGE table, you can speed up performance when joining multiple tables. MySQL only allows you to perform SELECT, DELETE, UPDATE and INSERT operations on the MERGE tables. If you use DROP TABLE statement on a MERGE table, only MERGE specification is removed. The underlying tables will not be affected.

Memory #

The memory tables are stored in memory and use hash indexes so that they are faster than MyISAM tables. The lifetime of the data of the memory tables depends on the uptime of the database server. The memory storage engine is formerly known as HEAP.

Archive #

The archive storage engine allows you to store a large number of records, which for archiving purpose, into a compressed format to save disk space. The archive storage engine compresses a record when it is inserted and decompress it using the zlib library as it is read.

The archive tables only allow INSERT and SELECT statements. The ARCHIVE tables do not support indexes, so it is required a full table scanning for reading rows.

CSV #

The CSV storage engine stores data in comma-separated values (CSV) file format. A CSV table brings a convenient way to migrate data into non-SQL applications such as spreadsheet software.

CSV table does not support NULL data type. In addition, the read operation requires a full table scan.

FEDERATED #

The FEDERATED storage engine allows you to manage data from a remote MySQL server without using cluster or replication technology. The local federated table stores no data. When you query data from a local federated table, the data is pulled automatically from the remote federated tables.

Share this
Chetan S. Patil

Written by

Chetan S. Patil

Software Engineer in Pune — PHP, Symfony and SQL Server behind financial operations and payment systems.

About LinkedIn
PreviousClustered and Secondary Indexes NextPHP Cache

Related reading

All articles

MySQL · 2 min read

Clustered and Secondary Indexes

InnoDB table has a special index called the clustered index where the data for the rows is stored. Typically, the clustered index…

6 Jul 2016

MySQL · 4 min read

MySQL INDEXES

Database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or…

3 Jul 2016

Artificial Intelligence · 4 min read

AI: Mind-blowing Machines and What They Mean for Us Mere Mortals

We’re all living in the age of AI – from creepy-accurate face unlock on your phone to those “recommended for you” algorithms…

10 Jun 2024

CS Chetan Patil

Software Engineer in Pune — PHP, Symfony and SQL Server behind financial operations and payment systems.

i@chetanpatil.co.in

Site

About Projects Blog Gallery Resume Contact RSS

Elsewhere

Pune, Maharashtra · IST (UTC+5:30)

© 2026 Chetan S. Patil

Built with PHP & MySQL

Chetan Patil
About Projects Blog Gallery Contact Resume
i@chetanpatil.co.in