One of the first problems one finds with automation is building custom configuration files. Don't worry though: it's a simple problem to solve. In this article we discuss how to use Ansible templates to generate proper my.cnf files for each MariaDB host. The template...
Federico Razzoli
Running Ansible on a dedicated host
Many teams run Ansible plays from their laptops. In practice this just works, but this doesn't mean that it's an ideal way of using Ansible. Instead, we suggest to run it inside a dedicated host. In this article you'll find some good reason for that. Security...
MariaDB/MySQL IS NULL conditions and indexes
It is not uncommon for an application to use WHERE conditions like this: WHERE status = 'DELETED' OR status IS NULL If you run EXPLAIN, such conditions typically only cause the type column to be show ref_or_null. Whereas, without the...
How to monitor that AUTO_INCREMENT columns won’t reach their limit
AUTO_INCREMENT primary keys are useful, because they save us the trouble to generate a unique value for every row, delegating this task to the database. But when we reach the limit we need to take some action, or we won’t be able to insert more rows. On 5 May...
5 benefits of Infrastructure As Code
Infrastructure As Code is a paradigm that consists of describing our infrastructure (servers and their configuration) as code that is understood by automation software like Ansible, Puppet, Terraform, and so on. Automation software can then be used to recreate the...
MariaDB/MySQL: use SQL properly to run less queries
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...
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...