MySQL ALTER table add INDEX


Example

To improve performance one might want to add indexes to columns

ALTER TABLE TABLE_NAME ADD INDEX `index_name` (`column_name`)

altering to add composite (multiple column) indexes

ALTER TABLE TABLE_NAME ADD INDEX `index_name` (`col1`,`col2`)