Ensuring uniqueness on a varchar greater than 255 in MYSQL/InnoDB
- by Vijay Boyapati
I have a table which contains HTML entries for news pages. When I initially designed it I used URL as the primary key. I've learned the error of my ways because left-joining is super slow. So I want to redesign the table with an integer (id) primary key, but still keep the rows unique based on the URL.
The problem is that I've found URLs longer…