Author: Peter Whyte

  • Disk Usage by Top Tables Report in SQL Server

    The Disk Usage by Top Tables Report in SQL Server is a quick way to get the sizes of all tables within a database. It’ll show all tables largest to smallest tables by total size on disk. If you notice that a database is growing larger in size,…

    Read More


  • Change Git Remote URL to SSH from HTTPS

    This post is a guide on how to change Git from using SSH to HTTPS for authentication. Using SSH for your version control system is more efficient as we do not have to enter a password every time we need to contact the remote repository. You should have…

    Read More


  • List all Tables & Columns in Redshift or Postgres

    In this blog post I’m sharing SQL Script that will list all Tables and Columns in Redshift or Postgres for all Schemas. Redshift and Postgres are closely related, as Redshift is a fork of Postgres, sharing many similarities while also having distinct features. A lot of the core…

    Read More


  • Creating a Superuser in RedShift

    In Amazon Redshift, a superuser has the highest level of permissions, equivalent to the master user created during cluster setup. Superuser access should only be granted in specific scenarios, such as local test environments or temporary infrastructures. In production environments, it’s best to follow the Principle of Least…

    Read More


  • Drop Users in RedShift

    Dropping users in Amazon Redshift is a simple task, but sometimes you may encounter an error message if the user you are trying to drop is an owner of an object in the database, such as a schema, table, or view. When this happens, you will see one…

    Read More


  • Create a Test AWS RedShift Cluster

    Here’s a simple guide on creating a new AWS RedShift Cluster within a personal AWS test environment. Warning, if you’re testing this AWS Service you have to be rigorous with managing the cluster for billing reasons. I delete my cluster right after I’m done with it as you’ll…

    Read More


  • Show Last Backup Times in SQL Server

    If you’re running a SQL Server and you care about the data held in it, you should already be backing up the databases. But it’s always surprising the number of times you encounter business-critical databases not being backed up as a DBA! When given the opportunity to look…

    Read More


  • Why use WHERE 1=1 in SQL Queries

    A common SQL question is, why would anyone use WHERE 1=1 in their queries? And what does it do? The WHERE 1=1 condition means WHERE TRUE. It returns the same query result as it would without the WHERE Clause. There is no impact on query execution time. This…

    Read More


  • Setting up SSH Keys in WSL

    Setting up SSH keys on Windows is generally done via OpenSSL or Putty. We can set this up and have quick authentication to places like GitHub or Bitbucket. But, we are also able to rely on a Linux distro in WSL for our SSH. If you are developing…

    Read More


  • Install Git on Windows

    This is a post on how to install Git (version control system) on a Windows computer. For more information have a look at the git-scm page, which is where we can download the client. There are a lot of configuration options throughout this wizard install, but there is…

    Read More