Cumulative update package 3 for SQL Server 2014

Just minutes ago the latest CU-package for SQL Server 2014 got released.
It contains fixes for pretty much every single feature of SQL Server 2014.
Read the full article here, KB2984923!


If you don't like your query plan!

In one of the cool channels us SQLMVPs communicate through the question was raised about why do the execution plan do what they do, and we started to elaborate about tweaks and twerks, and apply hinting in one way or the other. Sometimes you need to do these ninja moves, but usually it's because your statistics are skewed and/or your cached query plan is to old and the data has changed to much. This is usually fixed by updating the statistics or rebuild/reorganize your indexes and updating the statistics. It might be that you need to revamp your indexes too. Maybe wrong cluster key och you need a non-clustered index and include some columns. This if the query you're trying to run is a common query or not. Sometimes even a filtered index might be needed, or sometimes partitioning can be of help. Major changes should only be done if this is a common and re-occuring query.

I'd like to end this post with a lovely quote:

I encourage you to consider updating statistics rather than trying syntactic rewrites. Such things worked on rule-based optimizers but it is a goal of the SQL Server QP to avoid these kinds of gymnastics to the extent possible. Focus on the plans that come out and whether the optimizer has the right info to get you the plan shape you think is best more than the syntax. -Conor Cunningham

SQLTuneIn 2014

In May 2014 I went to Zagreb in Croatia for the SQLTuneIn2014. A totally awesome Conference, I strongly recommend you guys to visit them.

It was some sunny days in Croatia, really nice to have some pre-taste of summer for a swede like myself. And there was this incredible nice hotel, and awesome SQL friends. When I arrived to the Zagreb International Airport, a small and effective Airport, I was greeted by Dean Vittner who offered me a ride to the hotel. And at the hotel we met up with Denny Cherry on the patio by the lobby. The weather and Company was so nice I almost forgot to check in to the hotel, six hours and some beers later the check in was a reality.

Anyway, on site I was informed my session slot were one hour and I just realized I had a 75 minutes session so I had to spend the days to trim the content. Like that never happens to us guys doing presentations... ;) While I was adjusting content I also wanted to add a new demo in the session. Once again, like that never happens when you go through the content and prepping for delivery... ;) I wanted to incorporate the new, cool In-Memory OLTP feature in the data model.

(Note to self: You should never, ever add stuff in the last minute, and this is even more important if you cut 20% of the content just to fit the session slot.)

The session is about Entity Framework and how you can utilize SQL Server functionality in an easy and feasible way to gain higher security and build for performance. With EF6.1 you can let the framework create procedures and specify data types as well as other SQL specific configuration. Ok, this is done with an initialization class and the SQL content it creates just delivers the functionality, and SQL wise there are alot you want to change and optimize.

At least you get the objects "for free", the cool stuff comes when you apply SQL logic, or as I would call it common sense, to the data model. We can normalize the table structures to a better data model, we can create views to mimic the former data model, and we alter the CRUD-procedures to manage the new model.

You can download the slidedeck and the demo files from this link. Download session content!