TheARCHIVE
storage engine is a storage engine that uses gzip to compress rows. It is mainly used for storing large amounts of data, without indexes, with only a very small footprint.
A table using theARCHIVE
storage engine is stored in two files on disk. There's a table definition file with an extension of .frm, and a data file with the extension .ARZ. At times during optimization, a .ARN file will appear.
New rows are inserted into a compression buffer and are flushed to disk when needed. SELECTs cause a flush. Sometimes, rows created by multi-row inserts are not visible until the statement is complete.
ARCHIVE
allows a maximum of one key. The key must be on anAUTO_INCREMENT
column, and can be aPRIMARY KEY
or a non-unique key. However, it has a limitation: it is not possible to insert a value which is lower than the nextAUTO_INCREMENT
value.
Although the plugin's shared library is distributed with MariaDB by default, the plugin is not actually installed by MariaDB by default. There are two methods that can be used to install the plugin with MariaDB.
The first method can be used to install the plugin without restarting the server. You can install the plugin dynamically by executingINSTALL SONAME
orINSTALL PLUGIN
. For example:
INSTALLSONAME'ha_archive';
The second method can be used to tell the server to load the plugin when it starts up. The plugin can be installed this way by providing the--plugin-load
or the--plugin-load-add
options. This can be specified as a command-line argument tomysqld
or it can be specified in a relevant serveroption group in anoption file. For example:
[mariadb]...plugin_load_add = ha_archive
You can uninstall the plugin dynamically by executingUNINSTALL SONAME
orUNINSTALL PLUGIN
. For example:
UNINSTALLSONAME'ha_archive';
If you installed the plugin by providing the--plugin-load
or the--plugin-load-add
options in a relevant serveroption group in anoption file, then those options should be removed to prevent the plugin from being loaded the next time the server is restarted.
.frm
file is missing.