2 messages in com.mysql.lists.bugsMYISAMCHK Bug| From | Sent On | Attachments |
|---|---|---|
| Kelvin | 20 Mar 2001 18:13 | |
| Michael Widenius | 21 Mar 2001 08:54 |
| Subject: | MYISAMCHK Bug![]() |
|---|---|
| From: | Michael Widenius (mon...@mysql.com) |
| Date: | 03/21/2001 08:54:11 AM |
| List: | com.mysql.lists.bugs |
Hi!
"Kelvin" == Kelvin <kelv...@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




