Today was Microsoft Day. All the sessions I attended were based on the new features and changes that will come in the next edition of SQL Server (Code name Denali). The conference was kicked off by Christian Kleinerman. Christian has been working for Microsoft for a number of years and most recently has been involved with the Data Warehousing side of things for SQL Server. Microsoft is really focused on shifting user and business expectations. They understand that the future databases are going to be a great deal larger and to make those larger databases more effective they needed to help make a lot of things better.
One of the biggest and most exciting features is the Column Store index. This index is a new type of columnar nonclustered index. You can only have one column store index on a table but you can name as many columns as you want. It uses the Vertipaq technology from PowerPivot which is a client side in memory structure that handles the pivoting of data into what are called segments. These segments are groupings of 1 million values and the data are stored as blobs. This type of technology is expected to yield at least 10 times the performance for returning data. This efficiency does come with a few drawbacks though. For now, the columnar indexes are suited for tables that have mostly static data. You can also only use common SQL server data types. You also can’t change the data afterwards…although there are a few workarounds for this. You can of course drop and recreate the indexes, but another means to avoid this drawback is to partition your table and then bring new data in and out by swapping out the partitions. Also you can just do a union all with other tables or subsets etc. None the less I am very excited to start playing with the new columnar index. I will follow up with more posts on the feature later.
Another new feature is AlwaysOn. AlwaysOn is an enhancement on the database mirroring technology and merged it with clustering and then used for high availability. Previous to mirroring, which came out in SQL Server 2005, you only had clustering, log shipping or replication to support your needs of scaling out our processing power and high availability needs. Previous versions of the mirroring were basically just standby versions that you couldn’t query or use until you switched over to it…that is unless you were using snapshots on top of the mirror. The snapshots worked, but the whole process of maintaining them over the mirrors were cumbersome, and you could only use them for two SQL servers. Now with AlwaysON, it is like mirroring but you can use it on many different servers and databases via Availability Groups that you can query against and move over to individually and use for scaling out your performance intensive queries. You can add in a node for availability, scaling out to many other nodes by having secondary or more that are kept up to date with synchronous updates across great distances. This is really cool, but in a way it was really needed after they took away the read only log shipping capabilities in 2008. All in all a great edition and I welcome Microsoft’s initiative to recognize the needs of having synchronous copies of our databases for use. Brent Ozar has a more thorough review of the technology here
Microsoft is also starting to deploy what are called Parallel Data warehousing products as an “appliance”. When I say as an appliance, I mean they are taking all of the installation, hardware setup, configuration, and best practices and then bundling it all together in one package that they sell you that also includes all the servers, data storage, backup devices etc. They have a few of the largest vendors in their program, but HP is the currently the front runner. Essentially, you just order everything in one big package as a whole and you should be ready to handle all your data warehousing from the one package as an appliance. Supposedly, you just add data. This was the first I heard of such a thing, but it has been in the works since the end of last year and unveiled it in SQL Server 2008 R2. They also now have a Fast Track package available which is basically a road map or “Cook Book” if you will that uses various vendor offerings and they tell you how to set everything up yourself using all the best practices and vendor specific details. This is just the “Recipe” for success and you build and support it yourself on your own hardware and environment. You can read more about it here.
Also announced were numerous T-SQL enhancements. Denali will add what are called “contained databases” These databases include all the user and login metadata information all together with the database. Gone are the days of worrying about orphaned users and matching up the logins and users. Pretty cool. They added in Throw statements which are used with errors, a new paging syntax with fetch offset, sequence generators, and metadata discovery. There were also a number of other enhancements and offerings described that are listed here.
The final session of the day was Maciej Pileski’s SQL Server User Defined Functions, The Good, The bad, and the Ugly. I have to say first, that Maciej is one of the most charismatic and entertaining presenters I have ever met. He described the material effortlessly and with such high caliber quality. I couldn’t believe that someone could make a session so informative and exciting at the same time. Maciej described all the kinds of functions we have in SQL Server and listed out some performance issue we need to be aware of in their use. He described why using scalar functions can be very performance intensive and showed just how misleading an execution plan can be. In example, the execution plan can show 0% cost but if you take a look at the statistics IO or profiler you will see boat loads of activity and it executes RBAR(Row by Agonizing Row) for its operations. Next he described tabled value functions and their use when inline, multi-statement, or by using CLR. When we use inline they act as a view with a parameter. When we use multistatements they act like a stored procedure but they only assume one row is returned so they are basically a “BLACK BOX.” When we use CLR TVF’s we can take advantage of regular expressions. By far this was my favorite session of the day.
All together this was an extremely great start to the conference. I learned a lot about the new features and I am itching to get cracking on them as soon as I can. To top the day off I had dinner with Brent Ozar and Maciej Pilecki.

