Four 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 readingKILL and Query Store
I love Query Store. I like to think of it as SQL Server’s built-in monitoring tool and I use it a lot to look at query history in terms of run times and IO metrics. One thing I learned about Query Store recently is how it deals with queries that have been killed. Setting up…
Keep readingFour Flavours of Postgres Install – Part 2 (Docker Container, Linux Host)
In the last post, the first in this series about installing PostgreSQL, we looked at how to install PostgreSQL on Linux. This post is an alternative install method where we’ll look at how to install PostgreSQL on a Docker container, where the container is run on a Linux host. As before, we’ll run through the…
Keep readingTransaction Types
This post is just a quick reference post that outlines the three different types of transaction in Microsoft SQL Server. AutoCommit The default. Each statement in a batch works as though it had been individually wrapped in BEGIN TRAN / COMMIT so the following code block: is effectively the same as: This moves us nicely…
Keep readingFour Flavours of Postgres Install – Part 1 (Linux)
This is the first post in a short series documenting the various methods of installing PostgreSQL. In this post, we’ll look at how to install PostgreSQL natively on Linux and connect to the cluster we install from a remote client. The VM Firstly, let’s create a VM to install PostgreSQL on. I won’t detail the…
Keep readingCross Database Deferred Name Resolution
I have been aware of temporary stored procedures in Microsoft SQL Server for a long time but never really had cause to use them, however, recently a need arose. I was testing what effect some index changes would have on a particular stored procedure. The testing was on a non-production server, and when I went…
Keep reading#tsql2sday #200
This post is my first T-SQL Tuesday post since starting the blog a couple of months back. T-SQL Tuesday was originally set up by Adam Machanic, original creator of the essential sp_whoisactive stored procedure. The concept is that once a month, a different host puts out an invitation to the community for bloggers to write…
Keep readingSQL Server – See What’s Executing Now With DMVs
In SQL Server, there are a few DMVs that tell us “What is running now”. This is built into SSMS as Activity Monitor, but I’ve never met anyone who actually finds that method useful, there’s also sp_who and sp_who2, but they are dated and limited in what they tell you. Instead, the more robust way…
Keep readingInstalling PGAdmin on Linux Mint
This is a quick walkthrough of how I installed pgAdmin on Linux Mint. pgAdmin is one of the main management and query tools for PostgreSQL, which I like to use in conjunction with DBeaver. Installation The pgAdmin tool isn’t in the standard Linux Mint repositories, only phpPgAdmin, which is a web-based tool, similar to the…
Keep readingSchema Prefixing is Important
In this post, we’ll look at why it is important to prefix objects with their schema and look at an example where not prefixing objects with schemas can cause unexpected results. For this post, we’ll use the Northwind database, made available by Microsoft at the Northwind database repository on GitHub. I have made some modifications…
Keep reading