Linux "myisampack" Command Line Options and Examples
generate compressed, read-only MyISAM tables

The myisampack utility compresses MyISAM tables. myisampack works by compressing each column in the table separately. Usually, myisampack packs the data file 40% to 70%.


Usage:

myisampack [options] file_name ...




Command Line Options:

--help
Display a help message and exit.
myisampack --help ...
--backup
Make a backup of each table's data file using the name tbl_name.OLD.
myisampack --backup ...
--character-sets-dir
The directory where character sets are installed. See Section 10.15, “Character Set Configuration”.
myisampack --character-sets-dir ...
--debug[
Write a debugging log. A typical debug_options string is d:t:o,file_name. The default is d:t:o.
myisampack --debug[ ...
--force
Produce a packed table even if it becomes larger than the original or if the intermediate file from an earlier invocation ofmyisampack exists. (myisampack creates an intermediate file named tbl_name.TMD in the database directory while it compresses thetable. If you kill myisampack, the .TMD file might not be deleted.) Normally, myisampack exits with an error if it finds thattbl_name.TMD exists. With --force, myisampack packs the table anyway.
myisampack --force ...
--join
Join all tables named on the command line into a single packed table big_tbl_name. All tables that are to be combined must haveidentical structure (same column names and types, same indexes, and so forth).big_tbl_name must not exist prior to the join operation. All source tables named on the command line to be merged intobig_tbl_name must exist. The source tables are read for the join operation but not modified.
myisampack --join ...
--silent
Silent mode. Write output only when errors occur.
myisampack --silent ...
--test
Do not actually pack the table, just test packing it.
myisampack --test ...
--tmpdir
Use the named directory as the location where myisampack creates temporary files.
myisampack --tmpdir ...
--verbose
Verbose mode. Write information about the progress of the packing operation and its result.
myisampack --verbose ...
--version
Display version information and exit.
myisampack --version ...
--wait
Wait and retry if the table is in use. If the mysqld server was invoked with external locking disabled, it is not a good idea toinvoke myisampack if the table might be updated by the server during the packing process.The following sequence of commands illustrates a typical table compression session:shell> ls -l station.*
myisampack --wait ...
-rw-rw-r--
1 jones my 994128 Apr 17 19:00 station.MYD
myisampack -rw-rw-r-- ...
-
normal: 20 empty-space: 16 empty-zero: 12 empty-fill: 11pre-space: 0 end-space: 12 table-lookups: 5 zero: 7Original trees: 57 After join: 17
myisampack - ...