tags:

views:

28

answers:

2

I have a small db app that stores URL's of all lengths, some extremely long (hundreds of characters) and some of typical length (< 50 characters). Am I introducing inefficiencies into the DB by declaring VARCHAR(1000) (or higher) as the type? Is there something better to use?

+2  A: 

http://www.boutell.com/newfaq/misc/urllength.html

As for me - I'm sure 1000 chars is quite enough for any url

zerkms
A: 

Depends on your RDMBS. In PostGreSQL you use type TEXT for variable length strings.

Joe Koberg