#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2006
    Posts
    36
    Rep Power
    14

    Myisamchk taking more than a day


    I have a large table 167M records that was corrupted and I am running myisamchk -o tablename. Its been running for over 24 hours and I think its only at 50%. Is it safe to kill this process and try the myisamchk -r again? I am just worried if I kill myisamchk if it will further damage the table.

    Thanks
  2. #2
  3. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,480
    Rep Power
    539
    Yes you should safely be able to stop the myisamchk and restart it with -r instead.

    The only thing that you will probably have to do is to delete the temporary file called yourTableName.TMD placed in parallel with the current table files. It is very often left when you stop myisamchk and the next start of myisamchk will complain about not being able to create that file due to that it alread exists.

    Good luck!
    /Stefan
  4. #3
  5. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,517
    Rep Power
    543
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2006
    Posts
    36
    Rep Power
    14
    Originally Posted by pabloj
    myisamchk should also have a parallel option that should speed things up.
    Thanks all. I waited till its finished to be on the safe side.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2006
    Posts
    331
    Rep Power
    46
    Just for reference, there is the --parallel-recover (-p) option, however, do note the following comment in the documentation:

    "--parallel-recover, -p

    Use the same technique as -r and -n, but create all the keys in parallel, using different threads. This is beta-quality code. Use at your own risk!"

    So, it might be a good idea to make a backup of your table files before issuing this command. Note that it is not a bad idea to do this before any repair using myisamchk, just to be on the safe-side.

IMN logo majestic logo threadwatch logo seochat tools logo