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...
Federico Razzoli
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...
PostgreSQL Features Missing in Amazon Redshift
Redshift is an Amazon database technology available for AWS customers. It is based on PostgreSQL 8. The codebase was modified to develop a horizontally scalable SQL DBMS, suitable for analytics, and in particular Data WareHouse. Many PostgreSQL features are not...
Why Tables need a Primary Key in MariaDB and MySQL
In MariaDB and MySQL, all tables should have a primary key – especially InnoDB tables. I mentioned this in several articles, see Primary Key in InnoDB: how they work and best practices. But occasionally people tell me that they are not convinced about that, and I have...
Updating triggers in production with MariaDB and MySQL
Sometimes it is necessary to update multiple triggers in production. It may be necessary to do so without causing temporary inconsistencies between them, which could cause a service disruption or lead to write incorrect data into the database. To update triggers...
What does NULL mean in SQL?
There have been endless discussions already if NULL should be implemented in relational databases, and if it should even be included in the relational theory. My favourite quote on this subject is from the person who helped Ted Codd to divulgate – and probably refine...
MariaDB/MySQL: Using views to grant or deny row-level privileges
Relational DBMSs allow to grant users permissions on certain tables or columns. Privileges can also determine what a user can do – typical privileges are SELECT, INSERT,DELETE, UPDATE. Privileges are assigned or revoked using the GRANT and REVOKE statements. But how...