The Bit Bucket

SQL Interview: 41 Sparse columns vs Nullable columns

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administrator Level: Medium

Question:

Your team is considering a design where a small number of tables would each have a very large number of columns.

One developer has suggested making the columns SPARSE where another has suggested just making them NULLable.

2025-04-28

Opinion: Dependency is a Relative Concept

Over the years, I’ve spent quite some time in Britain and there are many things that fascinate me about it.

Travelling Around

The first is that so many people that I meet with, particularly in England, have never seen much of the country, even though it’s not very big. They just don’t travel around to look at things. Even less have been to Ireland, even though it’s basically next door.

2025-04-27

Book Review: Made in America

I’m an unashamed fan of Bill Bryson. His ability to see through the fog of any topic, and to make sense of it all, is unsurpassed. I also find his writing very funny. The strange thing is he doesn’t come across that way in person. I’ve never understood that. I’ve seen interviews with him where he comes across as really flat, yet his writing is just amazing.

I’m also a fan of understanding more about language. So I was really pleased to get to read his book Made in America which is subtitled as An Informal History of American English. He published this back in 2016 and it’s been on my list for a while.

2025-04-26

SQL Interview: 40 Replacing text data type with varchar

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Advanced

Question:

You have a table in your database that contains six columns that are defined with the text data type.

When you run checks on your database, these columns are often flagged with deprecation warnings, and so you change each column as follows:

2025-04-25

SQL Interview: 39 Char data types and row compression

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Medium

Question:

You have a column in your database that is defined as char(20). Whenever you query it, 20 characters are returned, with space padding any unused characters.

An administrator has suggested applying ROW compression to the table, to save space and improve performance.

2025-04-23

SQL Server temporary stored procedures vs Snowflake anonymous stored procedures

Over the years, I’ve done some work with Snowflake. In fact, I got certified in it at one point, and I’ve stayed across its capabilities. I have friends that work there.

Overally, I found the SQL language that Snowflake offered to be pretty limited, and particularly at the time I spent the most time on it, it seemed to have gaps in what it provided.

One thing that fascinated me though was the idea of an anonymous stored procedure.

2025-04-22

Opinion: Buying new software to do what you already can do

I remember that back when Microsoft introduced the ribbon for the menu in Microsoft Excel, I was at a product group session where they explained why they did it. They told us that when they summarized all the requests from users for features to add to Excel, there was something amazing:

Almost every feature was already there

So, what they had was a discoverability issue, not a feature gap.

What prompted me to write this opinion today, is that I see exactly the same sort of issue in my data-related work. People are unaware of what their existing tooling and software can do, and wish features would be added, yet those features are already there.

2025-04-21

SDU Tools: Script Analytics View

Our free SDU Tools for developers and DBAs, now includes a very large number of tools, with procedures, functions, and views. One tool that was added a while back is ScriptAnalyticsView.

When we build BI systems, we create a data warehouse with tables that are structured as cleansed versions of the incoming data, and with strong referential integritty and consistency.

When we expose those tables to external BI tools like Power BI, Analysis Services, etc. we limit those tools to a series of views that we create. Generally we put them in a schema called Analytics, but it could have any name.

2025-04-20

SQL Interview: 38 Table Compression Candidates

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Medium

Question:

A developer in your team has suggested applying PAGE compression to all tables and indexes in your application database.

You are concerned that doing so might impact performance, and that ROW compression might be better.

2025-04-19