04/14/2021
by Marlon Ribunal
Comments Off on Book Review: High Performance SQL Server (Second Edition)

Book Review: High Performance SQL Server (Second Edition)

One of the technical books that sit on my work desk (or dining table, whichever is the case because I work from home full time now) at arm’s length as a resource book is Benjamin Navarez’s ( t | b ) book on SQL Server performance, High Performance SQL Server: Consistent Response for Mission-Critical Applications, now on it’s second edition.

I have the first edition of this book, and you can find my review here.

There are 2 new chapters in the new edition: SQL Server on Linux & Intelligent Query Processing. All the other chapters are also updated. The total number of new pages is at around 120 according to the author. And what I like with the new edition is that the chapters are divided among Part Headings which gives a good flow of the content. The chapters are divided into:

  • SQL Server Internals (Chapter 1 & 2)
  • Design and Configuration (Chapter 3 & 4)
  • Monitoring (Chapter 5 & 6)
  • Performance Tuning and Troubleshooting (Chapter 8, 9, 10 & 11)

Just to give you an idea of how much has changed since the first edition, aside from the fact that the first edition has smaller fonts and was hard to read for people like me who wears prescription glasses (thanks, Apress!), here’s the physical comparison of the two editions:

High Performance SQL Server
High Performance SQL Server First & Second Edition

The first chapter, which deals with Internals, has more coverage on the process of SQL Server Query Processing such as Simplification, Trivial Plan Optimization, the Memo, Full Optimization, Cost Estimation, etc.

The new Chapter 2 is a short chapter which covers SQL Server on Linux. It deals mostly with the short history and background of how SQL Server on Linux became possible (SQLOS/SQLPAL, Project Helsinki, and Drawbridge).

Chapter 3 (SQL Server Configuration) has a new section for Configuring SQL Server On Linux with new topics like Environment Variables, Performance Best Practices, Memory, Kernel Setting, etc.

Chapter 4 (tempdb Troubleshooting and Configuration) has a new sub-section for the SQL Server 2019 tempdb enhancement, Memory-Optimized tempdb Metadata.

Chapter 5 (Analyzing Wait Statistics) includes a sub-section for What’s New on SQL Server 2019. This was Chapter 2 in the first edition. So this is one chapter that was moved so the book can have a better flow.

Chapter 6 (The Query Store) has a new sub-section for Wait Statistics. As noted in this chapter, “collecting wait information on the Query Store was not implemented until SQL Server 2017.” So that was a good tidbit.

Not much has changed in Chapter 7 (SQL Server In-Memory Technologies). This chapter is placed under the heading of Performance Tuning and Troubleshooting. As such, I’d like to believe that this might be a good component to consider for performance purposes. I have no experience with In-Memory/Memory-Optimized Tables and so I cannot really tell if the author has done In-Memory Technologies justice. The in-depth coverage of any important technology like this probably requires an entire book by itself. This chapter gives me a good overview of the technology and examples, which, I think, is enough to provide me the understanding that I need to get started.

Chapter 8 (Performance Troubleshooting) deals with, as the heading suggests, performance troubleshooting. This chapter lists and explains the most useful Performance Counters, Dynamic Management Views and Functions.

Chapter 9 (Indexing) did not change that much, if updated at all from the first edition. Indexing is a big topic and you can find full books on this topic (I suggest Jason Strate’s Expert Performance Indexing in SQL Server 2019: Toward Faster Results and Lower Maintenance).

Chapter 10 (Intelligent Query Processing) is a new chapter. As noted by the author, this chapter is an introduction to this feature. The short topics included in this chapter are Batch Mode Adaptive Joins, Memory Grant Feedback, Interleaved Execution, Batch Mode on Rowstore, Table Variable Deferred Compilation, Scalar UDF Inlining, and Approximate Count Distinct.

Finally, Chapter 11 (SQL Server Storage) which deals with, well, storage. Data files configurations, VLFs, Volumes, RAID Levels, and other related topic are discussed in this final volume. This did not change much, if updated at all from the first edition.

But..one note…

One note that I have though is that, on Chapter 8, there are a couple of instances where the author emphasized certain topics with phrase “Introduced in SQL Server 2016 blah blah” but he did not clarify whether or not the same topics were updated or improved (or not) in SQL Server 2019. I’m talking specifically about the sub-sections on Operator-Level Performance Statistics and Trace Flags on Plans. Maybe they did not change at all; but the fact that these features were referred to in terms of the older version of SQL Server made it sound like this whole chapter is outdated. But it’s no big deal.

Do I recommend this book?

Yes, that’s for sure!

01/04/2021
by Marlon Ribunal
Comments Off on What A Year That Was

What A Year That Was

If anything, 2020 is an asterisk. Some lost their jobs. Some lost their loved ones. Perhaps more books will be written about it. Pundits will keep the conversation going. Data scientists will continue to crunch the numbers.

We will remember it for a very long time. Some just want to forget it and move on.

And many others will have it etched in their heart forever because of life-changing loss.

2020 was a promising year. We were embarking on a new decade, some of us were hopeful for a great start. By the end of the first quarter, everything seemed to have halted. All those goals and hopes for the new year vanquished. Some of us have been lucky enough to keep our jobs. There were countless people who were rendered unable to put food on the table. Some were just happy to get by then got hit by economic constriction.

But…

We will survive. And life will go on. That’s so cliche to say now considering the staggering numbers of lives we lost and the unimaginable impact of all this on the livelihood of people for years to come. But we will overcome.

I haven’t written anything on this blog in all through this aside from that one from March. But if I want to really get past it and break out of the slump, that needs to change. I need to get my muse back. I know it’s hard to maintain a positive attitude through all this. But there is no other way to rise above the ashes.

We need to aspire for meaning. We need to continue living.

We will rise.

03/02/2020
by Marlon Ribunal
Comments Off on Beginner’s Mind

Beginner’s Mind

 In the past years I would set out my year-ahead goals both on the personal and career fronts by looking ahead at the things I want to attain or accomplish in the coming year. I would have a list of these goals at the tailend of the previous year or at the beginning of the new year. This practice puts me in a retrospective mode, or a process that helps me navigate through my choices based on the maps laid out in the past.

This year is a bit different. This year we saw a new decade commencing. This year would lay the foundation of what lies ahead. It is the cornerstone upon which the next decade will be built.

It is is the perfect time for not only looking back to see where you’re at but also, more important, for prospecting for all the possibilities of the future to determine your bearing. Thus, I am embracing a prospective mode, or a process that helps me determine the right directions for all the things that I want to attain or accomplish in life in the year ahead and beyond.

I need a different mindset to do that, one that will keep me grounded to my roots and all the things that I have accomplished so far. But since I am preparing myself not only for the year ahead but also for the decade ahead, I need to challenge myself with bigger goals – specially on the personal front. 

Bigger goals could mean a lot of things. But for me it’s about becoming a better person over all – wether that’s me being a husband, a dad, a son, a friend, an employee, or just being me. Every aspect of my life is intertwined with everything that I want to do or accomplish.  Being a good provider to my family, for example, means that I must be a good employee. Being a good employee means that I must improve on my skills. Improving my skills means that I must find time to learn. And, so on.

To become the better me, I must embrace the Mamba Mentality – get better everyday at everything that I do. It’s “all about focusing on the process and trusting in the hard work when it matters most,” according to Kobe Bryant himself. If you listen to one of Kobe’s interviews, he would say that Mamba Mentality is “perfecting the basics”. 

The only way to perfect the basics is when you open yourself up as an empty vessel, as a student of life.

Then for this, I must embrace Shoshin. According to Wikipedia:

Shoshin (初心) is a word from Zen Buddhism meaning “beginner’s mind.” It refers to having an attitude of openness, eagerness, and lack of preconceptions when studying a subject, even when studying at an advanced level, just as a beginner would.

This year is so unlike the last ten years. This year opens the door to an exciting decade ahead. There are tons to learn. There are possibilities to test. And, there’s that great opportunity to become that best ME version.