Skip to content

Database

Everything our consultants learn while running databases for customers: Oracle, PostgreSQL, SQL Server, MySQL, MariaDB, MongoDB and Delphix. Expect hands-on posts about installation, day-to-day administration, backup and recovery, performance tuning, replication and upgrades.

MongoDB: How to translate SQL to MongoDB commands

Introduction Hi everybody If you work with databases, you will be familiar with the two main philosophies used in this domain: The SQL philosophy (RDBMS) and, of course, NoSQL databases.Some examples of SQL databases are Oracle and Postgres, while Nosql databases are MongoDB and Redis.How do these two philosophies work?Is it possible to switch from one language system to the… 

Las Vegas, from sin city to green city?

Introduction Oracle CloudWorld 2023 will start next week in Las Vegas, and I’m happy to participate in this worldwide event. As a Swiss citizen, when I think of Las Vegas, the first image that comes to my mind is that of dazzling lights, opulent casinos, and dancing fountains. A city that never sleeps, where excess seems to be the norm.… 

Las vegas by night

No more snapshot too old in PostgreSQL 17

Currently PostgreSQL has a feature which is called snapshot too old. While each release of PostgreSQL comes with a bunch of new features, sometimes features also get removed. Starting with PostgreSQL 17 there will be most likely no more “snapshot too old”. Before looking at why that got removed lets first have a look at what it is. The main… 

Do we need DBAs in 2023?

Introduction : Over the past months, people asked me more and more questions about the DBA role and the underlying question was often: Are we witnessing the end of the DBA role in IT? My first answer, after a big laugh, was that DEVOPS didn’t get rid of sysadmins, it is not going to get rid of DBAs, especially with… 

How to code better?

Sysadmins are traditionally more operators than developers, they code mainly scripts for automation reasons (shell scripts, Ansible, Terraform, aso). In addition, they can find themselves in situations where they need to analyse code or even decompile programs. Some sysadmins lack good programming methodology, that was my motivation to dig deeper into this subject. Are there simple rules to follow? As… 

Photo by Ilya Pavlov on Unsplash

“create user”, “create role”, what should be used in PostgreSQL?

Recently we’ve seen a video on YouTube which recommends not to use the “create user” command in PostgreSQL and instead always use the “create role” command. It was also mentioned that “create group” should not be used as well. We’ve been a bit surprised by this and this is the reason for this post. While we never use the “create… 

PostgreSQL 17: Allow “\watch” to stop based on the number of rows returned

psql already is really powerful but still it gets more features with almost every release of PostgreSQL. One example is the “\watch” meta command. This command was introduced in PostgreSQL 9.3 and hasn’t changed much since then. PostgreSQL 17, probably next year, will come with an extended “\watch” meta command. Before we look at what was added lets briefly look… 

Guide to Install and Use pgFormatter on Linux (openSUSE)

pgFormatter is a command-line tool used to format SQL code for PostgreSQL databases. It helps improve code readability and maintainability by applying consistent indentation and formatting rules to your SQL queries. This guide will walk you through the process of installing and using pgFormatter on a Linux system, specifically openSUSE. I. Installation For this guide, I will install pgFormatter using… 

PostgreSQL 17: pg_wait_events

As development of PostgreSQL 17 already started there are already some commits which bring in new functionality. One of them introduces a new catalog view called “pg_wait_events”. As the same implies, this view lists the known wait events for PostgreSQL. Many of those wait events came in over time since the “wait_event_type” and “wait_event” columns have been to PostgreSQL 9.6.… 

PostgreSQL 16: Playing with pg_stat_io (2) – evictions

In the last post in this little series we’ve looked at the “extends” statistic in pg_stat_io. In this post we’ll look at the “eviction” statistic. Before we go into the details: What is an eviction? Imagine the buffer cache is currently full and PostgreSQL needs to load another block from disk (or the OS cache). For this to work a… 

Redis: Using Access Control List (ACL) part2

Introduction In the first part with have seen what are Redis ACL and why we are using it.WE also have seen how to list users with the ACL LIST command. Let’s continue and go deeper with command usage and also how to use an external file. So let’s go for Redis ACL part two ! Multiple calls to ACL SETUSER… 

Simplifying PostgreSQL Management: A Guide to Install and Use pgcli

Managing databases is a crucial aspect for a DBA, and PostgreSQL is a powerful open-source relational database management system that is widely used. To interact with a PostgreSQL database, DBA and developers often rely on command-line tools. The default tool that is used is psql. What if I told you that you can simplify the interaction with your database with…