Announcement

Announcement Module
Collapse
No announcement yet.

Execution time of adding an index is too long

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Execution time of adding an index is too long

    Hi all,

    I have a table of 45 millions records.
    I am trying to create an index on a column.
    I run this job on Friday, today is Monday and this job is still working. Is there any chance to improve this situation?

    mysql> show processlist;
    +-----+------+-----------+--------+---------+--------+------ -------------+---------------------------------------------- ---------+
    | Id | User | Host | db | Command | Time | State | Info |
    +-----+------+-----------+--------+---------+--------+------ -------------+---------------------------------------------- ---------+
    | 823 | root | localhost | my_db | Query | 260699 | copy to tmp table | ALTER TABLE my_table ADD INDEX datetime (datetime)
    +-----+------+-----------+--------+---------+--------+------ -------------+---------------------------------------------- ---------+
    Coping into the "tmp table" is normal process or I can improve it by somehow?


    P.S. MySQL 4.0.45 / engine type: MyISAM

    Thanks in advance.
Working...
X