MySQL transactions can be read only. Here’s how to use them, and why they are useful.
In MySQL and MariaDB, all tables should have a primary key – especially InnoDB tables – this is almost common wisdom. But why? Let’s discuss the reasons.
Reducing the number of queries is important. The article describes how to use the SQL language more expressively (in MySQL) to achieve the purpose.
Returning random rows in a random order from a relational database is a very hard problem. In this article we will see an antipattern, we will discuss why this problem is so hard, and we’ll examine some imperfect solutions.
One of the trickiest problems in SQL is to query rows in tranches. This is typically needed in a website search, or in a dynamic catalogue where products appear as you scroll down. You want the DBMS to only return …
There are many non-obvious ways to return values from MySQL stored procedures, and each of them solves particular problems.
How to find useless indexes and get rid of them to improve your database performance.
When creating indexes, some common mistakes should be avoided.
How primary key are implemented in InnoDB, and how to build fast primary keys.
MariaDB 10.3 supports stored aggregate functions. Let’s see how to create them with examples.