Best way of keeping TEXT field unique in MySQL database
问题 I want make value of TEXT field unique in my MySQL table. After small research I discovered that everybody are discouraging using UNIQUE INDEX on TEXT fields, due to performance issues. What I want to use now is: 1) create another field to contain hash of TEXT value (md5(text_value)) 2) make this hash field UNIQUE index 3) use INSERT IGNORE in queries Is this solution complete, secure and optimal? (found it on SO) Is there a better way of achiving this goal? 回答1: As I was asked in the