mysql problem..need help..

Discussion in 'MySQL' started by perx, Mar 16, 2008.

  1. #1
    Hi,
    i have some problem regarding mysql that i need help.

    I have a member table that stores information of my user such as password,username,address,etc. Currently i have about 250k registered user(So thats 250k rows). The table has been running smoothly and querying to this table has been pretty fast. The table doesn't have an auto increment field before and i just assign the primary key to the username. Now, i need to add another auto increment field to it. But after i've done that, the database becomes significantly slower. Querying is super slow and sometimes when i try to browse the data from phpmyadmin, the database just hangs. As a result i have to restart the database.

    This problem only occurs after i added the auto increment field. I am very sure. Because after i remove it, everything goes back to normal...

    Can anyone help me here. I am really at a lost here....THANKS
     
    perx, Mar 16, 2008 IP
  2. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would dump the table out to say excel.

    Add your field, then set it to auto inc.

    Import your file back in and let it assign an id to everything on the fly.

    There really should not be any reason to have to do this because the auto inc field should be added without issue but there is something else going on.

    ON the re import it should show itself and thats where the real problem is.
     
    LittleJonSupportSite, Mar 16, 2008 IP