ALTER TABLE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Roedig

    #1

    ALTER TABLE

    I have a somewhat large table (abt 4 million records) and when I do an ALTER
    TABLE to add a column the database hangs. I have plenty of free disk space
    and memory. The server version is 4.0.17 and the table type is InnoDB. Has
    anyone experienced this behavior?

    Thanks!
    Mike


  • Heikki Tuuri

    #2
    Re: ALTER TABLE

    Mike,

    "Michael Roedig" <michael.roedig @fuse.net> kirjoitti viestissä
    news:400e9b84$0 $12814$a04e5680 @nnrp.fuse.net. ..[color=blue]
    > I have a somewhat large table (abt 4 million records) and when I do an[/color]
    ALTER[color=blue]
    > TABLE to add a column the database hangs.[/color]

    does it really hang, or does it just take very long? What does 'top' or the
    Windows Task Manager say? MySQL rebuilds the whole table if you add a
    column.
    [color=blue]
    > I have plenty of free disk space
    > and memory. The server version is 4.0.17 and the table type is InnoDB.[/color]
    Has[color=blue]
    > anyone experienced this behavior?
    >
    > Thanks!
    > Mike[/color]

    Best regards,

    Heikki Tuuri
    Innobase Oy
    http://www.innodb.com
    Foreign keys, transactions, and row level locking for MySQL
    InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
    tables

    Order MySQL technical support from https://order.mysql.com/


    Comment

    • Heikki Tuuri

      #3
      Re: ALTER TABLE

      Mike,

      "Michael Roedig" <michael.roedig @fuse.net> kirjoitti viestissä
      news:400e9b84$0 $12814$a04e5680 @nnrp.fuse.net. ..[color=blue]
      > I have a somewhat large table (abt 4 million records) and when I do an[/color]
      ALTER[color=blue]
      > TABLE to add a column the database hangs.[/color]

      does it really hang, or does it just take very long? What does 'top' or the
      Windows Task Manager say? MySQL rebuilds the whole table if you add a
      column.
      [color=blue]
      > I have plenty of free disk space
      > and memory. The server version is 4.0.17 and the table type is InnoDB.[/color]
      Has[color=blue]
      > anyone experienced this behavior?
      >
      > Thanks!
      > Mike[/color]

      Best regards,

      Heikki Tuuri
      Innobase Oy
      http://www.innodb.com
      Foreign keys, transactions, and row level locking for MySQL
      InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
      tables

      Order MySQL technical support from https://order.mysql.com/


      Comment

      • Heikki Tuuri

        #4
        Re: ALTER TABLE

        Mike,

        "Michael Roedig" <michael.roedig @fuse.net> kirjoitti viestissä
        news:400e9b84$0 $12814$a04e5680 @nnrp.fuse.net. ..[color=blue]
        > I have a somewhat large table (abt 4 million records) and when I do an[/color]
        ALTER[color=blue]
        > TABLE to add a column the database hangs.[/color]

        does it really hang, or does it just take very long? What does 'top' or the
        Windows Task Manager say? MySQL rebuilds the whole table if you add a
        column.
        [color=blue]
        > I have plenty of free disk space
        > and memory. The server version is 4.0.17 and the table type is InnoDB.[/color]
        Has[color=blue]
        > anyone experienced this behavior?
        >
        > Thanks!
        > Mike[/color]

        Best regards,

        Heikki Tuuri
        Innobase Oy
        http://www.innodb.com
        Foreign keys, transactions, and row level locking for MySQL
        InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
        tables

        Order MySQL technical support from https://order.mysql.com/


        Comment

        Working...