21 May 2020
21 May 2020

Hands-On with Columnstore Indexes: Part 1 Architecture

Microsoft introduced Columnstore with SQL Server 2012 and have improved the feature in every version since then. You may be wondering why they are different than traditional indexes and how they work. In this series, Edward Pollack explains the architecture of Columnstore indexes. In future articles in the series, he will describe best practices for Columnstore.… Read more
07 October 2019
07 October 2019

SQL and Scope

Understanding scoping rules is a basic skill for developers. In this article, Joe Celko gives a bit of the history of scoping in early programming languages and shows how scoping applies to SQL queries as well. … Read more
15 July 2019
15 July 2019

Modeling Time

There are those who argue that time doesn’t really exist; it’s just an illusion. That debate won’t keep you from storing and manipulating dates and time in SQL Server. In this article, Joe Celko discusses some of the many ways that SQL Server treats temporal data types.… Read more
13 March 2019
13 March 2019

Converting a History Table into a System-Versioned Temporal Table

Temporal tables were introduced with SQL Server 2016. To take advantage of this feature, you might start fresh with a brand new table. It is possible, however, to convert an existing table with accumulated history to the new functionality. In this article, Mala Mahadevan explains how to create temporal tables for both scenarios.… Read more
12 March 2019
12 March 2019

Why You Shouldn’t Hardcode the Current Database Name in Your Views, Functions, and Stored Procedures

“There are only two hard things in Computer Science: cache invalidation and naming things”Phil Karlton I’m terrible at naming things. I recently wrote some quick code to reproduce a design problem and demonstrate several options for solutions, and later realized that I’d named my objects dbo.Foo, dbo.FooFoo, and dbo.Wat. But I feel strongly about a … Read more
10 January 2019
10 January 2019

Empty Thoughts: Working with NULL

Whether or not to have NULLable columns in a table can be a religious debate, and how missing data is represented should be carefully considered during database design. In this article, Joe Celko considers the ways that SQL Server handles NULLs in several situations. … Read more
05 December 2018
05 December 2018

Data Quality

Problems with data quality are easier and cheaper to prevent than to solve later. In this article, Joe Celko talks about data quality and where the issues tend to happen.… Read more