~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to man/myisamchk.1

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
.\"     Title: \fBmyisamchk\fR
3
3
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
4
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
 
.\"      Date: 07/06/2010
 
5
.\"      Date: 12/16/2011
6
6
.\"    Manual: MySQL Database System
7
7
.\"    Source: MySQL 5.1
8
8
.\"  Language: English
9
9
.\"
10
 
.TH "\FBMYISAMCHK\FR" "1" "07/06/2010" "MySQL 5\&.1" "MySQL Database System"
 
10
.TH "\FBMYISAMCHK\FR" "1" "12/16/2011" "MySQL 5\&.1" "MySQL Database System"
11
11
.\" -----------------------------------------------------------------
12
12
.\" * set default formatting
13
13
.\" -----------------------------------------------------------------
38
38
\&.MYI
39
39
files for storing data and indexes)\&.
40
40
.PP
 
41
You can also use the
 
42
CHECK TABLE
 
43
and
 
44
REPAIR TABLE
 
45
statements to check and repair
 
46
MyISAM
 
47
tables\&. See
 
48
Section\ \&12.7.2.3, \(lqCHECK TABLE Syntax\(rq, and
 
49
Section\ \&12.7.2.6, \(lqREPAIR TABLE Syntax\(rq\&.
 
50
.PP
41
51
The use of
42
52
\fBmyisamchk\fR
43
53
with partitioned tables is not supported\&.
98
108
\fBmyisamchk\fR
99
109
command line if you wish\&. You can also specify a table by naming its index file (the file with the
100
110
\&.MYI
101
 
suffix)\&. This allows you to specify all tables in a directory by using the pattern
 
111
suffix)\&. This enables you to specify all tables in a directory by using the pattern
102
112
*\&.MYI\&. For example, if you are in a database directory, you can check all the
103
113
MyISAM
104
114
tables in that directory like this:
171
181
This command assumes that you have more than 64MB free\&. For more information about memory allocation with
172
182
\fBmyisamchk\fR, see
173
183
the section called \(lqMYISAMCHK MEMORY USAGE\(rq\&.
 
184
.PP
 
185
For additional information about using
 
186
\fBmyisamchk\fR, see
 
187
Section\ \&6.6, \(lqMyISAM Table Maintenance and Crash Recovery\(rq\&.
174
188
.if n \{\
175
189
.sp
176
190
.\}
219
233
instead of
220
234
\fBmyisamchk\fR
221
235
to check tables\&. See
222
 
Section\ \&12.4.2.3, \(lqCHECK TABLE Syntax\(rq\&.
 
236
Section\ \&12.7.2.3, \(lqCHECK TABLE Syntax\(rq\&.
223
237
.sp .5v
224
238
.RE
225
239
.PP
226
240
\fBmyisamchk\fR
227
241
supports the following options, which can be specified on the command line or in the
228
242
[myisamchk]
229
 
option file group\&.
 
243
group of an option file\&.
230
244
\fBmyisamchk\fR
231
245
also supports the options for processing option files described at
232
246
Section\ \&4.2.3.3.1, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&.
383
397
.\" write_buffer_size myisamchk variable
384
398
.TS
385
399
allbox tab(:);
386
 
l l
 
400
lB lB.
 
401
T{
 
402
Variable
 
403
T}:T{
 
404
Default Value
 
405
T}
 
406
.T&
387
407
l l
388
408
l l
389
409
l l
396
416
l l
397
417
l l.
398
418
T{
399
 
\fBVariable\fR
400
 
T}:T{
401
 
\fBDefault Value\fR
402
 
T}
403
 
T{
404
419
decode_bits
405
420
T}:T{
406
421
9
524
539
system variable\&. For more information, see the description of
525
540
myisam_stats_method
526
541
in
527
 
Section\ \&5.1.4, \(lqServer System Variables\(rq, and
528
 
Section\ \&7.4.7, \(lqMyISAM Index Statistics Collection\(rq\&.
 
542
Section\ \&5.1.3, \(lqServer System Variables\(rq, and
 
543
Section\ \&7.5.4, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&.
529
544
.PP
530
545
ft_min_word_len
531
546
and
657
672
key_buffer_size
658
673
variable to a large value helps the repair operation run faster\&.
659
674
.sp
 
675
See also the description of this option under table repair options\&.
 
676
.sp
660
677
For a description of the output format, see
661
678
the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&.
662
679
.RE
867
884
.sp
868
885
Do a repair that tries to recover every possible row from the data file\&. Normally, this also finds a lot of garbage rows\&. Do not use this option unless you are desperate\&.
869
886
.sp
 
887
See also the description of this option under table checking options\&.
 
888
.sp
870
889
For a description of the output format, see
871
890
the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&.
872
891
.RE
2052
2071
\- check data record references index: 3
2053
2072
Key:  3:  Keyblocks used:  98%  Packed:  \-14%  Max levels:  3
2054
2073
Total:    Keyblocks used:  98%  Packed:   89%
2055
 
\- check records and index references
2056
 
\fI*** LOTS OF ROW NUMBERS DELETED ***\fR
 
2074
\- check records and index references\fI*** LOTS OF ROW NUMBERS DELETED ***\fR
2057
2075
Records:            306688  M\&.recordlength:       25  Packed:            83%
2058
2076
Recordspace used:       97% Empty space:           2% Blocks/Record:   1\&.00
2059
2077
Record blocks:      306688  Delete blocks:         0
2327
2345
\fBmyisamchk\fR
2328
2346
on very large tables, you should first decide how much memory you want it to use\&. The default is to use only about 3MB to perform repairs\&. By using larger values, you can get
2329
2347
\fBmyisamchk\fR
2330
 
to operate faster\&. For example, if you have more than 32MB RAM, you could use options such as these (in addition to any other options you might specify):
 
2348
to operate faster\&. For example, if you have more than 512MB RAM available, you could use options such as these (in addition to any other options you might specify):
2331
2349
.sp
2332
2350
.if n \{\
2333
2351
.RS 4
2334
2352
.\}
2335
2353
.nf
2336
 
shell> \fBmyisamchk \-\-sort_buffer_size=16M \e\fR
2337
 
           \fB\-\-key_buffer_size=16M \e\fR
2338
 
           \fB\-\-read_buffer_size=1M \e\fR
2339
 
           \fB\-\-write_buffer_size=1M \&.\&.\&.\fR
 
2354
shell> \fBmyisamchk \-\-sort_buffer_size=256M \e\fR
 
2355
           \fB\-\-key_buffer_size=512M \e\fR
 
2356
           \fB\-\-read_buffer_size=64M \e\fR
 
2357
           \fB\-\-write_buffer_size=64M \&.\&.\&.\fR
2340
2358
.fi
2341
2359
.if n \{\
2342
2360
.RE
2344
2362
.PP
2345
2363
Using
2346
2364
\fB\-\-sort_buffer_size=16M\fR
2347
 
should probably be enough for most cases\&.
 
2365
is probably enough for most cases\&.
2348
2366
.PP
2349
2367
Be aware that
2350
2368
\fBmyisamchk\fR
2444
2462
.SH "COPYRIGHT"
2445
2463
.br
2446
2464
.PP
2447
 
Copyright \(co 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 
2465
Copyright \(co 1997, 2011, Oracle and/or its affiliates. All rights reserved.
2448
2466
.PP
2449
2467
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.
2450
2468
.PP