Hashes are normally represented in a human-readable format. The easiest way to work with them is to just insert this human-readable form into a table, as a string. But that is not an efficient way to work with hashes. This article explains how to read and write hashes...
Federico Razzoli
How to test database backups
Do you remember the infamous GitLab database incident in 2017? Three backup strategies in place... but no test. When they needed to quickly restore a backup there was none. You don't want to be in that situation. Here's a high level discussion about how to test...
MariaDB: The “Regexp AND LIKE” optimisation
MariaDB, like most databases, allow to run queries that use regular expressions in the WHERE clause. While this is powerful, a problem with using a regexp in a database is that it can't take advantage of an index. The reason is simple: the query optimiser can't...
A checklist for Database backup automation
A typical question we ask new customers is: do you have proper backups in place? Some of them have some form of backups, but answer no. The others give a wrong answer. Here's a checklist of things you should have in place. Checklist If you want to have reliable,...
MariaDB: WITH TIES syntax
MariaDB implemented the WITH TIES syntax in version 10.6. This feature may not be a ground breaker, but it is useful in some cases and it increases compatibility with some other DBMSs. Let's see what it does, and what use cases it has. Some history MariaDB (just like...
How to delete duplicate rows in MariaDB
Deleting duplicate values can be necessary, for example, when we realise that a column (or a combination of columns) should be UNIQUE. If the column existed in production for some time, it's possible that it now contains some duplicate values, so trying to create a...
The importance of maintenance windows
Maintenance windows are periods of time during which a service is made unavailable to allow for maintenance operations. Maintenance windows are announced with some advance, so that users do not get angry and can try to use the service before or after the maintenance...
The costs of using multiple database technologies
One great thing about microservice architectures is that different services can use different database technologies. For example, an online store may use MariaDB to persist purchases, Redis for caching a complex catalogue, Elasticsearch for fulltext searches against...
How slow is SELECT * ?
The most widely known query optimisation rule is that developers should always avoid SELECT *. Even when all columns are needed, they should list their names, because more columns could be created in the future. But developers find this really annoying: listing the...
Identify useless queries in MariaDB/MySQL
Do you want to improve your application’s and database server’s performance? Of course one of the most important things to do is to optimise the most impacting queries. You have various ways to find them, depending on what exactly you mean by “most impacting”....