Question

What's your strategy for determining nvarchar column sizes say for a address field? Do you always use nvarchar(max) or a fixed maximum size?

There is nothing worse than data integration breaking due to too small columns. What are possible implications of using nvarchar(max) vs. a fixed maximum varchar size? I understand there is something about indices getting too large but what about query performance? Is there anything else to consider?

Was it helpful?

Solution

One row or field per address line, perhaps 100 long.

In ye olden days, people had to write on an envelope. No need for War and Peace epic addresses

And how would you break out post code, country, town etc if it was one field. Or lookups as Astander mentioned too.

Anyway, don't use max: there are some overhead because it's a BLOB datatype.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top