When an application slows down, the database is one of the first places to look. In MySQL, MariaDB and PostgreSQL we read slow query logs and query plans, and remove the bottleneck through index design, query rewriting, InnoDB and PostgreSQL memory settings, connection management and data clean-up.