What's the proper column type to save urls in MySQL? -
I am using varchar (300)
, but I have seen too many URLs . Use
TEXT
, enter each URL
Is enough for>.
Note that with the long URL
, you will not be able to create an index that covers the entire URL
if you have UNIQUE
index is required, then you should calculate the URL
hash, store the hash separately and instead the hashes should be indexed.
Comments
Post a Comment