Make query ALTER TABLE run Faster?

Discussion in 'MySQL' started by tnd, Feb 11, 2008.

  1. #1
    I try to change one of field in table to small variable, from varchar(10) to char(2). Since I have big table (~ 35 mil. reconds, data on disk is ~ 8.6GB), it take time almost 4 days but it still not yet finish or complete, so I would like to know how to make this change faster or I need to change any system setting?


    Server Spec.
    Intel Pentium P4 4.0Ghz 4GB
    Fedora Core 4
    MySQL 4.1.16
     
    tnd, Feb 11, 2008 IP
  2. ximpda

    ximpda Guest

    Messages:
    277
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    holy cow !!!!!!!!!!!!!! a query for 4 days ?????????
     
    ximpda, Feb 11, 2008 IP
  3. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #3
    Sometimes it's faster to create a new table and then just copy data from the old one. Maybe you could try that.
     
    SoKickIt, Feb 11, 2008 IP
  4. mjesales

    mjesales Peon

    Messages:
    326
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I had to add some indexs to a 300k record 1gig database, it was far faster to move it to a new database and add the indexes than it was to just add them in. I got stuck doing it the hard way because i also moved it to mysql 5 in the process
     
    mjesales, Feb 26, 2008 IP