[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-bugs
Subject:    MYISAMCHK Bug
From:       Michael Widenius <monty () mysql ! com>
Date:       2001-03-21 16:54:33
[Download RAW message or body]


Hi!

>>>>> "Kelvin" == Kelvin  <kelvinsh@ms.chtn.com.tw> writes:

Kelvin> I  was try MySQL 3.23.34  in  Windows 98  , 
Kelvin> because I want to load a large text file into a MYISAM table , 
Kelvin> I use command   {  myisamchk --keys-used=0 -rq /path/tbl_name  )   to  remove all index
Kelvin> from table , and use   { LOAD DATA INFILE .......... } to import my text file  , 
Kelvin> it was so slowly .
 
Kelvin> I  try to use ISAM table , use command {isamchk --keys-used=0 -rq /path/tbl_name }
Kelvin> and { LOAD DATA INFILE ........} to import text file, it was very fast.
 
Kelvin> {myisamchk}  command has some bug ???  it can't use --keys-used=0 to remove all index.

You can in most cases use --keys-used=0 to remove all indexes.

The problem here is that LOAD DATA INFILE is probably using delayed
key creation after the data is imported and will then recreate all
indexes (even if you have deleted them previously).

On the other hand, MySQL 3.23 with MYISAM tables will automaticly use
the trick of importing things without keys and create the keys
afterwards, so the myisamchk trick is not really needed.

To get MySQL to be as fast as myisamchk, you have just to make the
myisam_sort_buffer variable big enough.

Regards,
Monty

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail bugs-thread1124@lists.mysql.com
To unsubscribe, e-mail <bugs-unsubscribe@lists.mysql.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic