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...
Federico Razzoli
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”....
NULL comparisons in MariaDB, PostgreSQL, and SQLite
Any comparison involving at least one NULL operand will return NULL. This is an implicit characteristics of NULL. But sometimes developers write too verbose conditions to handle NULL. For example when they want to consider NULLs equal they...
Choosing Cassandra consistency levels wisely
It is very important to understand Cassandra consistency levels, to choose the best balance between speed and consistency. In this article I’ve put some quick notes for persons who are new to Cassandra, and some good practices that in my opinion it’s better to...