tags:

views:

28

answers:

2

I want to store url's as unique in a mysql database table but with string type varchar and text the length of a 1000 is too long. Lengths of Search engine friendly url's can be typically long,whats an acceptable length?

+1  A: 

Well if you want to cover yourself, 2000 characters, according to this question

Tim Joseph
+1  A: 

There really is no length that will guarantee unique- if you want to make sure a string of a given length is unique, you need to take a hash of the string and compare it, MD5 and SHA1 are common algoritms people use.

James Connell
Which is obviously still not an absolute guarantee of uniqueness.
Adam Robinson
Not sure what you mean, an MD5 hash of a string is unique for all practical purposes
James Connell