MySQL Archive: Difference between revisions

Content deleted Content added
BrianAker (talk | contribs)
No edit summary
 
(36 intermediate revisions by 27 users not shown)
Line 1:
{{Short description|Database engine}}
{{ Infobox Software
| name = ArchiveStorage Engine
| logo =
| logo =
| screenshot =
| caption =
| author = [[Brian Aker]]
| developer =
| collapsible = yes
| released = 2004
| developer =
| released = 2004
| latest release version =
| latest release date =
| latest preview version =
| latest preview date =
| operating system = [[Windows]], [[Linux]], [[Mac OS X]], = [[UNIXCross-platform]]
| platform = [[x86 architecture|x86]], [[x86-64]], [[SparcSPARC]], [[MIPS architecture|MIPS]], [[Power PCPowerPC]]
| size =
| language = C/C++
| programming language = [[C (programming language)|C]], [[C++]]
| genre = [[Database engine]]
| license = [[GNU General Public License]]
| website = [http://mysql.bkbits.com http://mysql.bkbits.com]
| website =
}}
== MySQL Archive Storage Engine ==
 
'''Archive''' is a storage engine for the [[MySQL]] [[relational database management system]]. ItUsers iscan anuse this analytic storage engine which allows a user to create a table whichthat is "archive"“archive” only. NoData data cancannot be deleted from thethis table, only added. The Archive engine uses a compression strategy based aroundon the [[Zlibzlib]] library. Itand takes a row andit packs itthe byrows using a bit header to represent nulls and removes all whitespace for character type fields. OnceWhen this is donecompleted, the row is then inserted into the compression buffer and waits to be flushed to disk based on eitherby an explicit flush table, a read, or by the closing of the table.
 
One of the current restrictions of Archive tables is that they do not support any indexes, thus necessitating a table scan for any SELECT tasks. Archive tables, however, are supported by the MySQL Query Cache, which can dramatically reduce response times for Archive table queries that are repetitively issued.<ref>https://web.archive.org/web/20100212100829/http://dev.mysql.com/tech-resources/articles/storage-engine.html The MySQL 5.0 Archive Storage Engine (archive date 20100212)</ref> MySQL is examining index support for Archive tables in upcoming releases.
The engine is not [[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.
 
The engine is not [[ACID]] compliant. Unlike [[OLTP]] engines, it uses a "stream" format to disk with no block boundaries. The head of the Archive file generated is a byte array representing the data format and contents of thethat file. In MySQL 5.1, a copy of the MySQL FRM file, which is usedstored to representin the definitionheader of aeach table,Archive beganfile. toThe beFRM storedfile, inwhich represents the headerdefinition of eacha Archive file. Thistable, allows an archiveArchive file to restorebe itselfrestored to a MySQL serversserver if itthe Archive file is copied aroundto like anythe ordinary fileserver.
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.
 
Despite itsthe use of [[zlib]], itarchive isfiles are not compatible with [[gzio]], the basis of the [[gzip]] tools. It uses its own azio system whichthat 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.
 
ItArchive differs from the other MySQL analytical engine, [[MyISAM]], by being a row -level locking engine and by the fact that it keepskeeping a constant version snapshot throughout a single query (making it [[Multiversion concurrency control|MVCC]]). This means that Archive willdoes not lock for concurrent bulk inserts. For bulk inserts it performs an interlaced INSERT, so unlike MyISAM, order is not guaranteed.
The tool archive_reader is provided that allows for a user to take an online snapshot of a table. It can also be used to change the characteristics of an archive file.
 
TheUsers toolcan archive_readeruse isthe providedarchive_reader that allows for a usertool to take an online snapshot of a table. It can also be usedand to change the characteristics of an archive file.
To create an Archive table, one has to specify the engine string:
 
To create an Archive table, specify the following t1engine (string:
a int,
b varchar(32))
ENGINE=ARCHIVE
 
<syntaxhighlight lang="mysql">
The MySQL Archive Storage Engine was authored and is maintained by Brian Aker. It was introduced in 2004 with MySQL 4.1.
create table t1 (
a int,
b varchar(32))
ENGINE=ARCHIVE
</syntaxhighlight>
 
The MySQL <ref>[https://www.w3schools.blog/ MySQL Tutorial]</ref> Archive Storage Engine was authored and is maintained by [[Brian Aker]]. It was introduced in 2004 with MySQL 4.1.
== External links ==
* [http://dev.mysql.com/doc/refman/5.1/en/archive-storage-engine.html MySQL Documentation on Archive Storage Engine]
 
==References==
{{database-software-stub}}
{{Reflist}}
 
== External links ==
[[Category:Open source database management systems]]
* [http://dev.mysql.com/doc/refman/5.1/en/archive-storage-engine.html MySQL Documentation on Archive Storage Engine]
 
{{MySQL}}
 
[[Category:Database engines]]
[[Category:MySQL]]
 
 
{{database-software-stub}}