Press "Enter" to skip to content

Author: Kevin Feasel

The Downside Risk of Index Hints

Chad Callihan explains why you should be careful before deploying code which uses index hints:

This might be good enough…for now. The potential issues with index hints can be more about the future than the present. You might come along later on and think “why not use an index to cover the whole query?” We can add the index:

But if our query is still written to include the index hint (in a stored procedure for example) the new index is not going to matter. The old index is still forced to be used. Even if something better comes along, you’re going to need to modify the query in addition to adding the better index. If an index was added for a completely separate query but would also be an improvement for the query in question, it’s also not going to get by the index hint.

Click through for additional problems which can crop up as you use index hints. This isn’t a big argument against using them at all, but rather understanding (and remembering!) where you do use them and making sure that’s communicated well to the entire team, including future you.

Comments closed

A Wish List for SQL Server Monitoring

Chris Shaw lays out some of the problems with monitoring systems today:

A next-generation monitoring tool should not just provide the same standard old dashboard dressed up with new fancy graphs; it should empower me to be actionable. It needs to help me improve the environment and show me the impacts of those actions on the system, and thus, the business.

What the industry needs (for risk of rendering the title of this article bunk) is not another monitoring tool. I have tools that help me monitor and they do a fine job of specifically doing that.  I need a tool that will take me into the future, I need a tool that makes me better and faster at what I do.  This industry needs a smarter tool.

Click through to see what Chris has in mind, though the reason you haven’t seen some of this stuff is that it’s a couple orders of magnitude more difficult than what we do see in monitoring solutions. H/T Amanda White.

Comments closed

String Padding in T-SQL

Kenneth Fisher pads some work:

I’ve been working on converting a piece of DB2 code into T-SQL and one of the functions I had to replace was lpad. It’s a simple enough function that will pad a string on the left with another string. So changing 1234 to 00001234. It’s a common enough task when formatting strings. And both DB2 and Oracle provide both lpad and rpad functions. However, guess what? SQL Server doesn’t. So how do we handle that in T-SQL? It’s a pretty easy pattern.

Click through for the answer.

Comments closed

SQL Server 2012 End of Support

Debbi Lyons and Vijay Kumar have a reminder for us:

While new innovations keep lighting up in the latest releases of SQL Server and Windows Server, support for older versions along with security updates will eventually end. This can lead to the potential for compliance gaps for workloads that still rely on these versions and create missed opportunities to apply innovation to business-critical workloads. SQL Server 2012 and Windows Server 2012, and 2012 R2 End of Extended support is approaching:

– SQL Server 2012 Extended Support will end on July 12, 2022.

– Windows Server 2012 and 2012 R2 Extended Support will end on October 10, 2023.

The news this week has mostly been about SQL Server 2016 ending mainstream support, but this is a bigger one. Fortunately, there’s still a year to procrastinate plan.

Comments closed

Naming Worksheets in Power BI Paginated Report Excel Outputs

Paul Turley answers a question:

This question comes up every few years in SQL Server Reporting Services. Of course, in Power BI Paginated Reports, we have the same features. A couple of days ago, Karthik posted this question as a comment to my post titled Chapter 7 – Advanced Report Design:

I am working on a SSRS report where the grouping is done to group the records in to multiple tabs/worksheets. When the report is exported to excel, the worksheets has the default name (Sheet1, Sheet2, Sheet3,…). Here I want to override the default worksheet name with (Tab1, Tab2, Tab3, …). The number of tabs/worksheets varies each time depending on the parameter selection by the user. How to address this? any suggestions please.

Click through for the answer.

Comments closed

Using Kafka for Security Situational Awareness

Kai Waehner continues a series on using Apache Kafka on security teams:

Apache Kafka became the de facto standard for processing data in motion across enterprises and industries. Cybersecurity is a key success factor across all use cases. Kafka is not just used as a backbone and source of truth for data. It also monitors, correlates, and proactively acts on events from various real-time and batch data sources to detect anomalies and respond to incidents. This blog series explores use cases and architectures for Kafka in the cybersecurity space, including situational awareness, threat intelligence, forensics, air-gapped and zero trust environments, and SIEM / SOAR modernization. This post is part two: Cyber Situational Awareness.

Click through for the high-level discussion.

Comments closed

The Benefits of Cluster Sampling

Muhammad Touhidul Islam explains what cluster sampling is and why it can be useful:

Cluster sampling is defined as a sampling method where multiple clusters of people are created from a population where they are indicative of homogenous characteristics and have an equal chance of being a part of the sample. In this sampling method, a simple random sample is created from the different clusters in the population. This is a probability sampling procedure.

Click through for a few examples of where this can be useful.

Comments closed