SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ALTER TABLE add a field (performance/load)

    Hi,
    I'm wondering if there's troubles (performance/load) to add a field
    Code SQL:
    ALTER TABLE `lp_user` ADD `role` ENUM( 'user', 'querytool', 'admin' )
     CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'user'
    in a table with more than 500000 records ?

    Thanks in advance.

    Bye

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Maybe. It depends on the load the server is under when you run the command, how much available memory there is, your configuration directives (myisam_sort_buffer_size for example), how many indexes are declared on the table, and if it does have to hit disk to create a temporary table in order to execute this ALTER statement, what kind of IO load your disk subsystem is under at the time.

    These are all variables only you are aware of right now, so, maybe.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •