2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \" Title: \fBmyisampack\fR
2009-09-16 14:03:18 +02:00
. \" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
. \" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
. \" Date: 08/12/2009
2009-05-25 11:59:47 +02:00
. \" Manual: MySQL Database System
. \" Source: MySQL 5.1
2009-09-16 14:03:18 +02:00
. \" Language: English
2009-05-25 11:59:47 +02:00
. \"
2009-09-16 14:03:18 +02:00
.TH "\FBMYISAMPACK\FR" "1" "08/12/2009" "MySQL 5\&.1" "MySQL Database System"
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" myisampack
. \" compressed tables
. \" tables: compressed
. \" MyISAM: compressed tables
2009-05-25 11:59:47 +02:00
.SH "NAME"
myisampack \- generate compressed, read\- only MyISAM tables
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBmyisampack\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR \fB \fI file_name\fR\fR\fB\ \& .\&.\&.\fR\ 'u
\fB myisampack [\fR \fB \fI options\fR \fR \fB ] \fR \fB \fI file_name\fR \fR \fB \& .\& .\& .\fR
2009-05-25 11:59:47 +02:00
.SH "DESCRIPTION"
.PP
The
\fB myisampack\fR
utility compresses
MyISAM
2009-09-16 14:03:18 +02:00
tables\& .
2009-05-25 11:59:47 +02:00
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
works by compressing each column in the table separately\& . Usually,
2009-05-25 11:59:47 +02:00
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
packs the data file 40%\(en 70%\& .
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
When the table is used later, the server reads into memory the information needed to decompress columns\& . This results in much better performance when accessing individual rows, because you only have to uncompress exactly one row\& .
2009-05-25 11:59:47 +02:00
.PP
MySQL uses
mmap()
2009-09-16 14:03:18 +02:00
when possible to perform memory mapping on compressed tables\& . If
2009-05-25 11:59:47 +02:00
mmap()
2009-09-16 14:03:18 +02:00
does not work, MySQL falls back to normal read/write file operations\& .
2009-05-25 11:59:47 +02:00
.PP
Please note the following:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
If the
\fB mysqld\fR
server was invoked with external locking disabled, it is not a good idea to invoke
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
if the table might be updated by the server during the packing process\& . It is safest to compress tables with the server stopped\& .
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
After packing a table, it becomes read only\& . This is generally intended (such as when accessing packed tables on a CD)\& . Allowing writes to a packed table is on our TODO list, but with low priority\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
Invoke
\fB myisampack\fR
like this:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB myisampack [\fR \fB \fI options\fR \fR \fB ] \fR \fB \fI file_name\fR \fR \fB \& .\& .\& .\fR
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
Each file name argument should be the name of an index (\& .MYI) file\& . If you are not in the database directory, you should specify the path name to the file\& . It is permissible to omit the
\& .MYI
extension\& .
2009-05-25 11:59:47 +02:00
.PP
After you compress a table with
\fB myisampack\fR , you should use
\fB myisamchk \- rq\fR
2009-09-16 14:03:18 +02:00
to rebuild its indexes\& .
\fB myisamchk\fR (1)\& .
2009-05-25 11:59:47 +02:00
.PP
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
supports the options in the following list\& . It also reads option files and supports the options for processing them described at
Section\ \& 4.2.3.3.1, \(lq Command-Line Options that Affect Option-File Handling\(rq \& .
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: help option
. \" help option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- help\fR ,
\fB \- ?\fR
.sp
2009-09-16 14:03:18 +02:00
Display a help message and exit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: backup option
. \" backup option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- backup\fR ,
\fB \- b\fR
.sp
2009-09-16 14:03:18 +02:00
Make a backup of each table\' s data file using the name
\fI tbl_name\fR \& .OLD\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: character-sets-dir option
. \" character-sets-dir option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- character\- sets\- dir=\fR \fB \fI path\fR \fR
.sp
2009-09-16 14:03:18 +02:00
The directory where character sets are installed\& . See
Section\ \& 9.2, \(lq The Character Set Used for Data and Sorting\(rq \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: debug option
. \" debug option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- debug[=\fR \fB \fI debug_options\fR \fR \fB ]\fR ,
\fB \- # [\fR \fB \fI debug_options\fR \fR \fB ]\fR
.sp
2009-09-16 14:03:18 +02:00
Write a debugging log\& . A typical
2009-05-25 11:59:47 +02:00
\fI debug_options\fR
2009-09-16 14:03:18 +02:00
string is
\' d:t:o,\fI file_name\fR \' \& . The default is
\' d:t:o\' \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: force option
. \" force option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- force\fR ,
\fB \- f\fR
.sp
Produce a packed table even if it becomes larger than the original or if the intermediate file from an earlier invocation of
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
exists\& . (\fB myisampack\fR
2009-05-25 11:59:47 +02:00
creates an intermediate file named
2009-09-16 14:03:18 +02:00
\fI tbl_name\fR \& .TMD
in the database directory while it compresses the table\& . If you kill
2009-05-25 11:59:47 +02:00
\fB myisampack\fR , the
2009-09-16 14:03:18 +02:00
\& .TMD
file might not be deleted\& .) Normally,
2009-05-25 11:59:47 +02:00
\fB myisampack\fR
exits with an error if it finds that
2009-09-16 14:03:18 +02:00
\fI tbl_name\fR \& .TMD
exists\& . With
2009-05-25 11:59:47 +02:00
\fB \- \- force\fR ,
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
packs the table anyway\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: join option
. \" join option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- join=\fR \fB \fI big_tbl_name\fR \fR ,
\fB \- j \fR \fB \fI big_tbl_name\fR \fR
.sp
Join all tables named on the command line into a single packed table
2009-09-16 14:03:18 +02:00
\fI big_tbl_name\fR \& . All tables that are to be combined
2009-05-25 11:59:47 +02:00
\fI must\fR
2009-09-16 14:03:18 +02:00
have identical structure (same column names and types, same indexes, and so forth)\& .
2009-05-25 11:59:47 +02:00
.sp
\fI big_tbl_name\fR
2009-09-16 14:03:18 +02:00
must not exist prior to the join operation\& . All source tables named on the command line to be merged into
2009-05-25 11:59:47 +02:00
\fI big_tbl_name\fR
2009-09-16 14:03:18 +02:00
must exist\& . The source tables are read for the join operation but not modified\& . The join operation does not create a
\& .frm
2009-05-25 11:59:47 +02:00
file for
\fI big_tbl_name\fR , so after the join operation finishes, copy the
2009-09-16 14:03:18 +02:00
\& .frm
2009-05-25 11:59:47 +02:00
file from one of the source tables and name it
2009-09-16 14:03:18 +02:00
\fI big_tbl_name\fR \& .frm\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: silent option
. \" silent option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- silent\fR ,
\fB \- s\fR
.sp
2009-09-16 14:03:18 +02:00
Silent mode\& . Write output only when errors occur\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: test option
. \" test option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- test\fR ,
\fB \- t\fR
.sp
2009-09-16 14:03:18 +02:00
Do not actually pack the table, just test packing it\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: tmpdir option
. \" tmpdir option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- tmpdir=\fR \fB \fI path\fR \fR ,
\fB \- T \fR \fB \fI path\fR \fR
.sp
Use the named directory as the location where
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
creates temporary files\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: verbose option
. \" verbose option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- verbose\fR ,
\fB \- v\fR
.sp
2009-09-16 14:03:18 +02:00
Verbose mode\& . Write information about the progress of the packing operation and its result\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: version option
. \" version option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- version\fR ,
\fB \- V\fR
.sp
2009-09-16 14:03:18 +02:00
Display version information and exit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" myisampack: wait option
. \" wait option: myisampack
2009-05-25 11:59:47 +02:00
\fB \- \- wait\fR ,
\fB \- w\fR
.sp
2009-09-16 14:03:18 +02:00
Wait and retry if the table is in use\& . If the
2009-05-25 11:59:47 +02:00
\fB mysqld\fR
server was invoked with external locking disabled, it is not a good idea to invoke
\fB myisampack\fR
2009-09-16 14:03:18 +02:00
if the table might be updated by the server during the packing process\& .
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \" examples: compressed tables
2009-05-25 11:59:47 +02:00
.PP
The following sequence of commands illustrates a typical table compression session:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB ls \- l station\& .*\fR
\- rw\- rw\- r\- \- 1 monty my 994128 Apr 17 19:00 station\& .MYD
\- rw\- rw\- r\- \- 1 monty my 53248 Apr 17 19:00 station\& .MYI
\- rw\- rw\- r\- \- 1 monty my 5767 Apr 17 19:00 station\& .frm
2009-05-25 11:59:47 +02:00
shell> \fB myisamchk \- dvv station\fR
MyISAM file: station
Isam\- version: 2
Creation time: 1996\- 03\- 13 10:08:58
Recover time: 1997\- 02\- 02 3:06:43
Data records: 1192 Deleted blocks: 0
Datafile parts: 1192 Deleted data: 0
Datafile pointer (bytes): 2 Keyfile pointer (bytes): 2
Max datafile length: 54657023 Max keyfile length: 33554431
Recordlength: 834
Record format: Fixed length
table description:
Key Start Len Index Type Root Blocksize Rec/key
1 2 4 unique unsigned long 1024 1024 1
2009-09-16 14:03:18 +02:00
2 32 30 multip\& . text 10240 1024 1
2009-05-25 11:59:47 +02:00
Field Start Length Type
1 1 1
2 2 4
3 6 4
4 10 1
5 11 20
6 31 1
7 32 30
8 62 35
9 97 35
10 132 35
11 167 4
12 171 16
13 187 35
14 222 4
15 226 16
16 242 20
17 262 20
18 282 20
19 302 30
20 332 4
21 336 4
22 340 1
23 341 8
24 349 8
25 357 8
26 365 2
27 367 2
28 369 4
29 373 4
30 377 1
31 378 2
32 380 8
33 388 4
34 392 4
35 396 4
36 400 4
37 404 1
38 405 4
39 409 4
40 413 4
41 417 4
42 421 4
43 425 4
44 429 20
45 449 30
46 479 1
47 480 1
48 481 79
49 560 79
50 639 79
51 718 79
52 797 8
53 805 1
54 806 1
55 807 20
56 827 4
57 831 4
2009-09-16 14:03:18 +02:00
shell> \fB myisampack station\& .MYI\fR
Compressing station\& .MYI: (1192 records)
2009-05-25 11:59:47 +02:00
\- Calculating statistics
normal: 20 empty\- space: 16 empty\- zero: 12 empty\- fill: 11
pre\- space: 0 end\- space: 12 table\- lookups: 5 zero: 7
Original trees: 57 After join: 17
\- Compressing file
2009-09-16 14:03:18 +02:00
87\& .14%
2009-05-25 11:59:47 +02:00
Remember to run myisamchk \- rq on compressed tables
2009-09-16 14:03:18 +02:00
shell> \fB ls \- l station\& .*\fR
\- rw\- rw\- r\- \- 1 monty my 127874 Apr 17 19:00 station\& .MYD
\- rw\- rw\- r\- \- 1 monty my 55296 Apr 17 19:04 station\& .MYI
\- rw\- rw\- r\- \- 1 monty my 5767 Apr 17 19:00 station\& .frm
2009-05-25 11:59:47 +02:00
shell> \fB myisamchk \- dvv station\fR
MyISAM file: station
Isam\- version: 2
Creation time: 1996\- 03\- 13 10:08:58
Recover time: 1997\- 04\- 17 19:04:26
Data records: 1192 Deleted blocks: 0
Datafile parts: 1192 Deleted data: 0
Datafile pointer (bytes): 3 Keyfile pointer (bytes): 1
Max datafile length: 16777215 Max keyfile length: 131071
Recordlength: 834
Record format: Compressed
table description:
Key Start Len Index Type Root Blocksize Rec/key
1 2 4 unique unsigned long 10240 1024 1
2009-09-16 14:03:18 +02:00
2 32 30 multip\& . text 54272 1024 1
2009-05-25 11:59:47 +02:00
Field Start Length Type Huff tree Bits
1 1 1 constant 1 0
2 2 4 zerofill(1) 2 9
3 6 4 no zeros, zerofill(1) 2 9
4 10 1 3 9
5 11 20 table\- lookup 4 0
6 31 1 3 9
7 32 30 no endspace, not_always 5 9
8 62 35 no endspace, not_always, no empty 6 9
9 97 35 no empty 7 9
10 132 35 no endspace, not_always, no empty 6 9
11 167 4 zerofill(1) 2 9
12 171 16 no endspace, not_always, no empty 5 9
13 187 35 no endspace, not_always, no empty 6 9
14 222 4 zerofill(1) 2 9
15 226 16 no endspace, not_always, no empty 5 9
16 242 20 no endspace, not_always 8 9
17 262 20 no endspace, no empty 8 9
18 282 20 no endspace, no empty 5 9
19 302 30 no endspace, no empty 6 9
20 332 4 always zero 2 9
21 336 4 always zero 2 9
22 340 1 3 9
23 341 8 table\- lookup 9 0
24 349 8 table\- lookup 10 0
25 357 8 always zero 2 9
26 365 2 2 9
27 367 2 no zeros, zerofill(1) 2 9
28 369 4 no zeros, zerofill(1) 2 9
29 373 4 table\- lookup 11 0
30 377 1 3 9
31 378 2 no zeros, zerofill(1) 2 9
32 380 8 no zeros 2 9
33 388 4 always zero 2 9
34 392 4 table\- lookup 12 0
35 396 4 no zeros, zerofill(1) 13 9
36 400 4 no zeros, zerofill(1) 2 9
37 404 1 2 9
38 405 4 no zeros 2 9
39 409 4 always zero 2 9
40 413 4 no zeros 2 9
41 417 4 always zero 2 9
42 421 4 no zeros 2 9
43 425 4 always zero 2 9
44 429 20 no empty 3 9
45 449 30 no empty 3 9
46 479 1 14 4
47 480 1 14 4
48 481 79 no endspace, no empty 15 9
49 560 79 no empty 2 9
50 639 79 no empty 2 9
51 718 79 no endspace 16 9
52 797 8 no empty 2 9
53 805 1 17 1
54 806 1 3 9
55 807 20 no empty 3 9
56 827 4 no zeros, zerofill(2) 2 9
57 831 4 no zeros, zerofill(1) 2 9
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
\fB myisampack\fR
displays the following kinds of information:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
normal
.sp
2009-09-16 14:03:18 +02:00
The number of columns for which no extra packing is used\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
empty\- space
.sp
2009-09-16 14:03:18 +02:00
The number of columns containing values that are only spaces\& . These occupy one bit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
empty\- zero
.sp
2009-09-16 14:03:18 +02:00
The number of columns containing values that are only binary zeros\& . These occupy one bit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
empty\- fill
.sp
2009-09-16 14:03:18 +02:00
The number of integer columns that do not occupy the full byte range of their type\& . These are changed to a smaller type\& . For example, a
2009-05-25 11:59:47 +02:00
BIGINT
column (eight bytes) can be stored as a
TINYINT
column (one byte) if all its values are in the range from
\- 128
to
2009-09-16 14:03:18 +02:00
127\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
pre\- space
.sp
2009-09-16 14:03:18 +02:00
The number of decimal columns that are stored with leading spaces\& . In this case, each value contains a count for the number of leading spaces\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
end\- space
.sp
2009-09-16 14:03:18 +02:00
The number of columns that have a lot of trailing spaces\& . In this case, each value contains a count for the number of trailing spaces\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
table\- lookup
.sp
The column had only a small number of different values, which were converted to an
ENUM
2009-09-16 14:03:18 +02:00
before Huffman compression\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
zero
.sp
2009-09-16 14:03:18 +02:00
The number of columns for which all values are zero\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
Original trees
.sp
2009-09-16 14:03:18 +02:00
The initial number of Huffman trees\& .
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
After join
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
The number of distinct Huffman trees left after joining trees to save some header space\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
After a table has been compressed,
\fB myisamchk \- dvv\fR
prints additional information about each column:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
Type
.sp
2009-09-16 14:03:18 +02:00
The data type\& . The value may contain any of the following descriptors:
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
constant
.sp
2009-09-16 14:03:18 +02:00
All rows have the same value\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
no endspace
.sp
2009-09-16 14:03:18 +02:00
Do not store endspace\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
no endspace, not_always
.sp
2009-09-16 14:03:18 +02:00
Do not store endspace and do not do endspace compression for all values\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
no endspace, no empty
.sp
2009-09-16 14:03:18 +02:00
Do not store endspace\& . Do not store empty values\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
table\- lookup
.sp
The column was converted to an
2009-09-16 14:03:18 +02:00
ENUM\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
zerofill(\fI N\fR )
.sp
The most significant
\fI N\fR
2009-09-16 14:03:18 +02:00
bytes in the value are always 0 and are not stored\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
no zeros
.sp
2009-09-16 14:03:18 +02:00
Do not store zeros\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
always zero
.sp
2009-09-16 14:03:18 +02:00
Zero values are stored using one bit\& .
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
Huff tree
.sp
2009-09-16 14:03:18 +02:00
The number of the Huffman tree associated with the column\& .
.RE
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
Bits
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
The number of bits used in the Huffman tree\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
After you run
\fB myisampack\fR , you must run
\fB myisamchk\fR
2009-09-16 14:03:18 +02:00
to re\- create any indexes\& . At this time, you can also sort the index blocks and create statistics needed for the MySQL optimizer to work more efficiently:
2009-05-25 11:59:47 +02:00
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB myisamchk \- rq \- \- sort\- index \- \- analyze \fR \fB \fI tbl_name\fR \fR \fB \& .MYI\fR
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
After you have installed the packed table into the MySQL database directory, you should execute
\fB mysqladmin flush\- tables\fR
to force
\fB mysqld\fR
2009-09-16 14:03:18 +02:00
to start using the new table\& .
2009-05-25 11:59:47 +02:00
.PP
To unpack a packed table, use the
\fB \- \- unpack\fR
option to
2009-09-16 14:03:18 +02:00
\fB myisamchk\fR \& .
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2009-09-16 14:03:18 +02:00
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
2009-05-25 11:59:47 +02:00
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
2009-09-16 14:03:18 +02:00
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
2009-09-16 14:03:18 +02:00
Sun Microsystems, Inc. (http://www.mysql.com/).