mysql - unique fields with size issue -


I have a mysql database and I'm trying to enter URLs and unique IDs in two separate fields. One of the URLs is sometimes more than 800 characters long I tried to create a unique index of ID and URL, so that I can not link to the URL / ID combo only once, but let me know about the length of the index area Receives an error.

Am I currently collecting url as varchar Should I use a blog? or something else? How will this affect the unique index?

Keep the URL in a TEXT field, in the other column < Keep code> MD5 , and create a unique index on the hash column.


Comments