Installing MongoDB on Debian
In preparation for an upcoming project (stay tuned for more details), I needed to set up a MongoDB database server. In this post, we’ll walk through how to install and configure MongoDB on Debian 12. At the time of writing, Debian 13 is the most up to date stable version of Debian, though MongoDB is…
Keep readingReseed Identity – Can it Cause Clashes?
I recently had cause to reseed an identity column on a table in SQL Server, which got me wondering “If we reseed an identity column to a value lower than the existing identity values in the column, could it cause a clash?” Because why wouldn’t you wonder if you can cause something to break, whilst…
Keep readingI Was Today Years Old When…Stored Procedures – Optional String Quotes
Today’s post is a quick one and the first in a new series I am calling “I Was Today Years Old When…” where I share simple little nuggets that I stumbled across where I think “How…HOW have I never known this” The series for me will serve as a reminder as to why I love…
Keep readingsp_executesql and Execution Plans
Whilst I would say the actual execution plan is the most useful, estimated execution plans have their place – sometimes you just need to see estimates or a quick verification that a change you have made has had some effect on plan shape. I find them helpful to quickly see if a change made to…
Keep readingSetting up the Stack Overflow database in Postgres
I’ve worked with Microsoft SQL Server for many years as well as dipping my toes into the MySQL world as and when required, however, I have not done as much with PostgreSQL. It’s hard to ignore the momentum that Postgres has built in recent years; it is moving up the Stack Overflow Developer Survey and…
Keep readingCurse of the Catch-All query
The catch-all query – a fairly common pattern that is often seen in SQL Server apps where there is a list of results that can be filtered by one or more criteria. This usually takes the form of a stored procedure that is constructed as below. The example stored procedure is created in the Stack…
Keep readingOR predicates and Indexes
In this post, we will look at how SQL Server accesses indexes when an OR predicate is used. For this demo, I am going to use the Stack Overflow Database. I am using the large 2024 version provided under cc-by-sa 4.0 licence from Stack Exchange Data Dump and running in compatibility level 160 on a…
Keep readingFour Flavours of Postgres Install – Part 4 (Windows)
This post is the next in a short series exploring the different ways we can install a PostgreSQL server. This time, we’ll look at a vanilla install on Windows – no Docker involved. The VM I’ll use the same spec VM as in the last post, which is sufficient for demonstration purposes: Firstly, let’s hop…
Keep readingIn a Query Plan Near You – Stats Loaded For Compilation
Something I have been making use of recently is the change in the way statistics that have been used to compile a plan are presented to us as SQL Server users. On a number of occasions I have needed to understand, or at least get some sense of, which statistics SQL Server has used to…
Keep readingFour Flavours of Postgres Install – Part 3 (Docker Container, Windows Host)
In this series, we’ve been working through the different ways to install PostgreSQL. In Part 3, we move into the Windows world and will install PostgreSQL as a Docker container. Unlike Part 2, where the host was a Linux machine, this time, the host is a Windows server. The VM I’ll use the same spec…
Keep reading