MySQL Archive: Difference between revisions

Content deleted Content added
BrianAker (talk | contribs)
BrianAker (talk | contribs)
Line 22:
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 nornot [[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. In 5.1 a copy of the MySQL FRM file, which is used to represent the definition of a table, began to be stored in the header of each Archive file. This allows an archive file to restore itself to a MySQL servers if it is copied around like any ordinary 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 [[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.