Must attend training day for anyone serious about SQL
I was in Denmark earlier this year speaking at Miracle Open World and I heard about a guy that had done a session the year before about the internals of PDF files. This year he was doing the one on MDF files. This was a must see, so I popped along.
Mark S. Rasmussen is the guy in question.
What he had done I found amazing. He wasn’t repeating the same old stuff from books online or from some blog. Mark had dug deep into the MDF file in such a way that he had mapped the structures to C# structures so that he could query the data for a table. For instance he wrote code to break up a row into its constituent parts i.e. the null bitmap, the fixed columns the variable columns etc.
The main reason I found this fascinating is that for a long time I’ve been speaking about SQL Server just being code and not “magic”. It has to read the data from a page, it has to find the row on the page, it has to read an index page to find out where to find the data page etc. It has to do all this with C code.
SQL Server is just code.
What Marks work highlights is how complex it is to get store data and get data back, and marks code doesn’t implement any consistency stuff like locks and latches.
If you’ve followed Mark on twitter http://twitter.com/improvedk or read his blog you may have seen him talking about how he has developed his code over the last few months. Just look at some recent posts
He has made the project available on Github https://github.com/improvedk/OrcaMDF
but even better he is doing a training day on this at SQLBits SQL_Server_Storage_Engine_and_MDF_File_Internals
This is not just about writing an MDF parser in C# this is more about understanding the internals of how data is stored.
If you understand the internals then it helps you to understand the significance of using (Nolock), how forward pointers in heaps affect performance, what happens when you add a column, what happens when you remove a column.
Once you know the internals then everything else makes much more sense and falls into place.
I reckon in doing this project Mark now knows more than anyone that hasn’t been on the product team.
So if you are serious about SQL Server then this really is a must.
So get registered and attend Mark’s session http://sqlbits.com/information/Registration.aspx