most efficient way to add index to large mysql table
问题 I have a mysql database with a particular table with a little over 6 million rows and no indexes. A simple query such as SELECT ... FROM log ORDER BY log_date ASC will take an unacceptable amount of time. I obviously need to add indexes to the table, but am unsure of the most efficient way to go about this. 1) My first option would be to issue ALTER TABLE log ADD INDEX log_date , but I'm not sure how long it would take... would it take approximately the same length of time as the previous