SQLServer 2008 and greater has some behaviors for handling strings and concatenation that a programmer should be aware of. To start with, you have a data type of VARCHAR and NVARCHAR. The difference between the two is unicode support. You will find a number of character data types with an N variant. The N type supports unicode and requires twice as much space to store. When you declare these data types, you can declare them as VARCHAR[(N|MAX)] where N is the number of characters to allocate. For a VARCHAR, this is 1-8000, for a NVARCHAR this is 1-4000. Remember a unicode character takes twice as much space to store. Also note that if you do not specify the length, the default is 1.
The team I work with has certainly learned a lot since we started working under agile. Most of this is all documented elsewhere and all I offer is another “opinion” in the sea of other opinions.
As we have established already, I work in development. I happen to be pretty good with data and getting it how I want it (which isn’t always right) and performance tuning. We will now establish that I work with a large, old application. We do very little greenfield work and large amounts of that revolve around reporting. Which brings us to a report being designed for a customer we intend to use for many customers. This customer happens to have large amounts of data and within the bounds of our present application, the report as it was written was not a performer. I mean we are executing common table expressions to get a MIN() on a date field on a table containing 36 million records and joining to it against a table with 9 million records.
So I work on an agile team which of course means working close together. Seems completely contrary to the developer mindset. Which of course means I spend all day on the headset and never have a “good day” as described by Scott Adams… And me…
This is going to contain all the stuff I care to rattle on about. Feel free to stick around and read about my life and what little I know…