Primary Keys and clustered indexes

One of the common misunderstandings in relation to the Microsoft SQL server is that a primary key always will be enforced with a clustered index.

That is not true, and in the following video I demonstrate that.

Expert Performance Indexing for SQL server 2012

Expert Performance Indexing for SQL Server 2012

Expert Performance Indexing for SQL Server 2012

One more book review 🙂 (It’s really nice having a long holiday to read books and relax).

This is also a “Must have book”; simply because Indexing is so important for good performance. Indexing is always a trade off between better read access to data versus storage and degrade in write performance, and I think this book gives you the tools to support your decisions when you are working with the part of performance that are related to indexing.

No doubt that my favorite chapter is the chapter about Myth’s when it comes to indexes. All persons working with SQL servers should read that chapter.

With this book you first get an insight into what indexes are, what types of indexes there is and what statistics are (statistics is critical to know in relation to performance optimization).

The book also describes some of the tools that are important to know when you want to work with indexes (including the most important DMO’s).

Finally I also like that the book gives you some good advices (they call it best practice and strategies) on how to write queries and how to use indexes.

Overall a very competent book (I think all books from APress is competent).

On the negative side, then it is easy to see that this book is an upgrade from the same book on SQL Server 2008, and one of the places where that is seen is when they discuss Column store indexes. It is few pages and it is absolutely NOT Expert knowledge what they give you.

I am not sure it is a negative thing, but the book is called “Expert performance….”. I think this book can be read and should be read by anyone that has been working with the Microsoft SQL server 2012 for more than 6 month to 1 year. It could be a good starting point for going deeper into the Microsoft SQL server.

I think this book is worth buying and I give it 3 out of 5 stars.


Microsoft SQL Server 2012 Internals

Microsoft SQL server 2012 Internals

Microsoft SQL server 2012 Internals

This book is a “must have book”, if you want to dig into the SQL server. Not only because it is written by some of the most Genius SQL persons (Kalen Delaney, Jonathan Kehayias, Benjamin Nevarez and Paul S. Randal), but because with this book, you get deep dive knowledge about how the SQL Server 2012 works.

The book is split into 14 chapters, starting with a very good introduction about the SQL server architecture, the SQLOS and databases.

Some of the new features are described in chapter 4, where an introduction to Contained databases are given.

As a MCT, then I really like when a book is focused and understandable, and one good example of this is on page 23, where it is stated that “SQL Server Books Only lists only 17 trace flags that are fully supported”. That means: If you want to pass an exam for MCSE on SQL server, then you must know 17 trace flags!!! (of course now the MCSE is changed so that it also covers Microsoft SQL Server 2014).

Chapter 6-9 is about indexes and storage, and that is of course important knowledge to have if you e.g. want to optimize performance.

Chapter 10-13 is a deep dive into how the SQL Server executes, how the Query optimizer works, and this is among my favorites. You can’t get enough information about how the Execution is done, how SQL server works with concurrency and how the SQL server is working with execution plans.


Knowing that the last chapter about DBCC is written by Paul Randal, then it is a “must read chapter”. Paul Randal has been writing a lot of the DBCC functionality, so here we get information about the DBCC command directly from one of the architects. And he knows what he is talking about 🙂

On the downside, then the book is not for beginners. I think that the reader should have at least 3-5 years of experience with Microsoft SQL Server, and he / she must have a good understanding about tables, indexes, queries, maintenance, Backup and so on.

Another downside is that in some places of the books, then we have output and examples that span multiple pages. It can be a little bit difficult to read.

I think this book deserves 4 out of 5 stars. I was a little bit in doubt about if it should be 4 or 5 stars, but on the other hand, then I must also say that this book is an update of the same book for SQL server 2008, and even though it describes new things in Microsoft SQL Server 2012 very well, then I can’t give 5 stars, when a lot of the material has been published before (to be fair. Everything has been rewritten and changed to SQL 2012).