Would adding an INDEX on varchar column in Mysql increase performance? I have the following table to store log messages:

CREATE TABLE `log` (
 `id` bigint(20) NOT NULL AUTO_INCREMENT,
 `timestamp` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
 `logger` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
 `level` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
 `message` varchar(4000) COLLATE utf8_unicode_ci DEFAULT NULL,
 `thread` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
 `file` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
 `line` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
 `machine` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10321 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci


There will be lots of SELECTs with a WHERE machine = 'xyz'

Would making this column an INDEX improve performance on that?
Answer is yes, indexing varchar data field increases the performance but it depends on the query you performed against that particular table. Lets consider the following two entities,

Card

Card Id (PK)  
Card Type  
Card Name

Registration

Reg Id (PK)   
Card Id (FK)   
Number of Registration


Lets consider a query, what are the total number of registration by card type?

Here, the card type is not frequently updated, it is either Credit or Debit Card. Therefore index on the card type data field is a good choice. Card type contains the values Credit card and Debit Card only.

If your non-key data field have such data and you need to perform the query in such a way mentioned above, you can create a non-unique key index for performance. 

I hope this answer will help you. Thank you.