0

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?

tau-neutrino
  • 3,270
  • 7
  • 25
  • 20

2 Answers2

2

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

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

zerkms
  • 249,484
  • 69
  • 436
  • 539
0

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

Joe Koberg
  • 25,416
  • 6
  • 48
  • 54