aria_pack

You are viewing an old version of this article. View the current version here.

aria_pack is a tool for compressing Aria tables. The resulting table are read-only, and usually about 40% to 70% smaller.

aria_pack is run as follows

aria_pack [options] file_name [file_name2...]

The file name is the .MAI index file. The extension can be omitted, although keeping it permits wildcards, such as

aria_pack *.MAI

to compress all the files.

aria_pack compresses each column separately, and, when the resulting data is read, only the individual rows and columns required need to be decompressed, allowing for quicker reading.

Once a table has been packed, use aria_chk -rq (the quick and recover options) to rebuild its indexes.

Options

The following variables can be set while passed as commandline options to aria_pack, or set in the [ariapack] section in your my.cnf file.

OptionDescription
-b, --backupMake a backup of the table as table_name.OLD.
--character-sets-dir=nameDirectory where character sets are.
-#, --debug[=name]Output debug log. Often this is 'd:t:o,filename'.
-f, --forceForce packing of table even if it gets bigger or if tempfile exists.
-j, --join=nameJoin all given tables into 'new_table_name'. All tables MUST have identical layouts.
-?, --helpDisplay help and exit.
-s, --silentOnly write output when an error occurs.
-T, --tmpdir=nameUse temporary directory to store temporary table.
-t, --testDon't pack table, only test packing it.
-v, --verboseWrite info about progress and packing result. Use many -v for more verbosity!
-V, --versionOutput version information and exit.
-w, --waitWait and retry if table is in use.

Uncompressing

To uncompress a table compressed with aria_pack, use the aria_chk -u option.

Example

> aria_pack /my/data/test/posts
Compressing /my/data/test/posts.MAD: (1690 records)
- Calculating statistics
- Compressing file
37.71%     
> aria_chk -rq --ignore-control-file /my/data/test/posts
- check record delete-chain
- recovering (with keycache) Aria-table '/my/data/test/posts'
Data records: 1690
State updated

See also

Comments

Comments loading...
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.