Notes from the system

Notes on systems, development, automation, databases, IT design… and some gaming when it is worth it. Written when there is something worth sharing.

About →

How to make your databases smaller and faster: find unused indexes

Indexes are one of the most powerful performance tools in SQL Server — and one of the most overlooked sources of overhead. Every index you create must be maintained on every INSERT, UPDATE, and DELETE operation. Unused indexes cost you disk space, backup time, memory, and write performance, without providing any read benefit. Finding and…

Queries to see rapidly what your SQL Server is doing NOW

When troubleshooting performance issues on a SQL Server instance, the first step is always to understand what is happening right now: which queries are running, which sessions are blocking others, and where time is being spent waiting. These three T-SQL scripts give you an immediate picture of the current workload using Dynamic Management Views (DMVs)…

Using Recursive Algorithms to Traverse Tree Structures

Recursion is one of the most elegant tools in programming: a function that calls itself to solve progressively smaller instances of a problem. For traversing tree structures — such as the filesystem, category trees or XML structures — it’s often the most natural and efficient solution. This article explains the concept and illustrates it with…

Achilles, the Tortoise and the Dilemma of a Certain Zeno…

What would happen if a great warrior and a small tortoise were to race? According to Zeno of Elea, the Greek mathematician and philosopher of the 5th century BC, the warrior would never catch the tortoise — at least according to the logic of his famous paradox. And yet common sense tells us the opposite…