Sometimes it is possible to do with one query what most people would do with two or more queries. This is done by using expressive SQL syntax that is often ignored. This principle applies to any database, but this article focuses on MySQL and MariaDB syntax. Why...
Federico Razzoli
The risks of MySQL release policy
A traditional software release circle starts with intensive development. The release early, release often model suggests to release incomplete, unstable versions as early as possible, making it very clear that they shouldn't be used in production. At some point the...
When to use NULLable columns in relational databases
In the article What does NULL mean in SQL? I explained why I consider SQL NULL inconsistent. As a general rule, I should have made clear that I don’t think it is a good idea to use NULL, even if columns are NULLable by default in SQL. However, there are...
READ ONLY transactions in MariaDB and MySQL
Transactions are the least known RDBMS features. Everyone knows they exist, but few know how they work. For this reason, it is not obvious that they can be read only. This article explains what read only transactions are and why we should use them when appropriate....
Using CONNECT to access remote MariaDB or MySQL tables
CONNECT is a powerful MariaDB storage engine designed to access remote data sources, using them as if they were local relational tables. We can query these tables and write data into them. While CONNECT supports a huge range of different data sources, the most common...
A MariaDB Server Fest 2020 review
As the strange times we live in impose to temporarily avoid events that imply physical gatherings, great virtual events are taking place. One of them was MariaDB Server Fest, organised by the MariaDB Foundation. Federico Razzoli from Vettabase gave two talks at the...
The most dangerous SQL statement
We asked this question on Twitter: what is the most dangerous SQL statement? https://twitter.com/vettabase/status/1303636207096795136?s=20 We didn't get many answers, but all of them were good and will be mentioned here! But first of all: the question is ambiguous, on...
Dropping database objects in a safe way
Whenever I worked as a DBA, I was reasonably scared by DROP commands. Don’t get me wrong: despite this, I badly wanted to drop obsolete tables. After that, I could more easily ask developers to fix bad practices, like tables without primary keys or without indexes at...
Logging all MariaDB and MySQL queries into the Slow Log
MySQL and MariaDB optionally log slow queries into the Slow Query Log – or just Slow Log, as friends call it. However, there are good reasons to log all the queries, not just some of them. This article shows how to log all available information into the Slow Log. Why...
Understanding tables usage with User Statistics on MariaDB and Percona Server
User Statistics is a plugin for MySQL developed by Percona. It is distributed and enabled by default in Percona Server and in MariaDB. It should be possible to compile it against MySQL, but we did not try. In this article we’ll see a few simple, yet useful queries to...








