Movatterモバイル変換


[0]ホーム

URL:


X

Copyright © 2025 MariaDB. All rights reserved.

Localized Versions

Archive

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.

Installing the Plugin

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

Uninstalling the Plugin

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.

Characteristics

  • SupportsINSERT andSELECT, but notDELETE,UPDATE orREPLACE.
  • Data is compressed with zlib as it is inserted, making it very small.
  • Data is slow the select, as it needs to be uncompressed, and, besides thequery cache, there is no cache.
  • Supports AUTO_INCREMENT (since MariaDB/MySQL 5.1.6), which can be a unique or a non-unique index.
  • Since MariaDB/MySQL 5.1.6, selects scan past BLOB columns unless they are specifically requested, making these queries much more efficient.
  • Does not supportspatial data types.
  • Does not supporttransactions.
  • Does not support foreign keys.
  • Does not supportvirtual columns.
  • No storage limit.
  • Supports row locking.
  • Supportstable discovery, and the server can access ARCHIVE tables even if the corresponding.frm file is missing.
  • OPTIMIZE TABLE andREPAIR TABLE can be used to compress the table in its entirety, resulting in slightly better compression.
  • With MariaDB, it is possible to upgrade from the MySQL 5.0 format without having to dump the tables.
  • INSERT DELAYED is supported.
  • Running many SELECTs during the insertions can deteriorate the compression, unless only multi-rows INSERTs and INSERT DELAYED are used.
  • No items found.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

[8]ページ先頭

©2009-2025 Movatter.jp