MySQL Archive
MySQL Archive Storage Engine
Archive is a storage engine for the MySQL relational database management system. It is an analytic storage engine which allows a user to create a table which is "archive" only. No data can be deleted from the table, only added. The Archive engine uses a compression strategy based around the Zlib library. It takes a row and packs it by using a bit header to represent nulls and removes all whitespace for character type fields. Once this is done the row is then inserted into the compression buffer and waits to be flushed to disk based on either an explicit flush table, a read, or by the closing of the table.
The engine is nether durable nor ACID compliant. Unlike OLTP engines it uses a "stream" format to disk with no block boundaries. The head of the file generated is a byte array representing the data format and contents of the file.
Despite its use of zlib it is not compatible with gzio, the basis of the gzip tools. It uses its own azio system which is a fork of gzio.
It differs from the other MySQL analytical engine [MYSQL MyISAM] by being a row level locking engine and by the fact that it keeps a constant version snapshot throughout a single query (making it [MVCC]). This means that Archive will not lock for concurrent bulk inserts. For bulk inserts it performs an interlaced INSERT, so unlike MyISAM order is not guaranteed.
To create an Archive table, one has to specify the engine string:
create table t1 ( a int, b varchar(32)) ENGINE=ARCHIVE
The MySQL Archive Storage Engine was authored and is maintained by Brian Aker. It was introduced in 2004 with MySQL 4.1.