#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171

    ALTERing large InnoDB table takes a long time.


    Hi;

    As expected, altering InnoDB tables with 10 million records takes a LONG time to ALTER and add index.

    What is the best way?

    Thanks
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Go get lunch while it's updating? I don't understand your question.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Originally Posted by E-Oreo
    Go get lunch while it's updating? I don't understand your question.
    Takes a whole day! And it looks like opening a session in PHP locks the session file. Subsequent HTTP requests to PHP scripts will block on session_start until the first HTTP request closes the session file. PHPMyAdmin holds the session file open while executing a query. So I can't use the same browser to accss php myadmin for a whole day.
  6. #4
  7. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,122
    Rep Power
    1990
    Originally Posted by zxcvbnm
    PHPMyAdmin holds the session file open while executing a query. So I can't use the same browser to accss php myadmin for a whole day.
    Do it through the command line. Won't block any PHP sessions, but will still slow down the server.
  8. #5
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,672
    Rep Power
    171
    Originally Posted by Catacaustic
    Do it through the command line. Won't block any PHP sessions, but will still slow down the server.
    Hi; I kinda achieved the same thing using 2 browsers.

    I run an ALTER query from a browser (Safari for example) and then close the browser, the query keeps going on. I then can still access phpmyadmin using FireFox.

    I also have a hard time accessing mysql on terminal (I use mac). Do you know of any good documents on that? For example "How to mysqldump from mac terminal". As simple as it looks like I cant find a source!

    Thanks
  10. #6
  11. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,122
    Rep Power
    1990
    I don't use a Mac at work, and at home they are really only my email machine and the entertainment system, so I don't really have much need to do that on a mac. If you're doing it locally then the standard mysql command line commands will work the same way as far as I know, and if it's on a remote server then you just need to SSH into that server.

IMN logo majestic logo threadwatch logo seochat tools logo