Skip to main content
MySQL and MariaDB database optimisation for slow sites
Database Optimisation

Database Optimisation MySQL and MariaDB

Is your site slow and the database the bottleneck? We analyse slow queries, add the right indexes, optimise the configuration and clean up your WordPress and WooCommerce database. Often together with overall speed optimisation: a single partner, in Italian, instead of an external DBA consultant.

The symptoms

Symptoms of a database that needs optimising

If you recognise one of these signs, the problem is often the database. You don’t have to settle for a slow site: in most cases it can be fixed.

Slow site and backend

Pages and the admin dashboard take seconds to load, and get worse as content grows.

Slow queries

The slow query log fills up with heavy requests that read entire tables without using indexes.

WooCommerce at peaks

The store slows down or errors out during traffic spikes, when many orders and sessions write at once.

Bloated database

Revisions, transients and autoloaded wp_options make the database grow, weighing down queries and backups.

What we do

Analysis, tuning and database cleanup

We don’t apply generic recipes: we measure the real state of the database and act where it truly matters. All handled by us, in Italian, with a full backup before every change.

Slow-query analysis

We enable the slow query log and analyse the heaviest queries with EXPLAIN to understand where the database wastes time. We identify the requests that really slow the site down, instead of trial and error.

Targeted indexing

We add missing indexes on the most-queried columns and remove useless ones. A correct index turns a full-table scan into an instant lookup, drastically reducing response times.

Configuration tuning

We configure InnoDB buffer pool, memory and server parameters based on the VPS’s real resources and the site’s load. No default settings: we adapt MySQL or MariaDB to your specific case.

Table cleanup and optimisation

We remove revisions, expired transients and useless data, lighten autoloaded wp_options on WordPress and recompact tables. A leaner database means faster backups and quicker responses.

Migration to InnoDB

We convert tables still on MyISAM to the InnoDB engine, which handles concurrency better with transactions and row-level locking. Often a decisive step for e-commerce with many simultaneous writes.

Performance monitoring

We don’t stop at a single intervention: we monitor the database’s load, queries and resources over time, so we can act before slowdowns start affecting the site again.

What’s included

Turnkey optimisation

From slow-query analysis to cleanup and tuning, we handle it all. You get a faster, lighter database and a clear report of what we improved.

Enabling the slow query log and analysing the heaviest queries with EXPLAIN

Indexes added where needed and removal of useless or redundant indexes

MySQL/MariaDB configuration tuning: InnoDB buffer pool, memory and parameters

Database cleanup: revisions, expired transients and autoloaded wp_options tables

Table optimisation and repair, with a full backup before every intervention

Migration of tables from MyISAM to InnoDB where it’s beneficial

Support in Italian and a clear report of what we found and improved

Managed VPS in Italy, with database monitoring from a single partner

We work on a quote basis, with an initial free analysis. Want a solid server management behind your database too? Take a look at our Linux server management.

FAQ

Frequently asked questions

Answers to the most common questions about slow queries, indexes, tuning and MySQL and MariaDB database cleanup.

How do I know if my slow site is really caused by the database?

A site or backend that slows down as content and orders grow, loading times that get worse during traffic peaks and slow internal searches are typical signs of a database that needs optimising. To be sure, we enable the slow query log and analyse the heaviest queries with EXPLAIN: this way we see in black and white whether the bottleneck is the database or something else, without guessing.

Which databases do you work on?

We work on MySQL, MariaDB and Percona Server, the most common engines for websites and web applications. They’re compatible with each other and underpin most WordPress, WooCommerce and PHP applications. We analyse the version in use and adapt the optimisation to its characteristics, including the changes introduced by MySQL 8.

What are indexes and why do they speed up queries so much?

An index is a structure that lets the database find data without scanning the whole table, a bit like the index at the back of a book. Without the right indexes, every search reads all the rows (full table scan) and gets slow as data grows. With EXPLAIN we identify queries that don’t use indexes and add the missing ones: often the intervention that brings the most noticeable improvement.

Isn’t the query cache enough to speed everything up?

MySQL’s query cache was deprecated and removed as of MySQL 8, because on real workloads it often ended up slowing things down instead of helping. Today performance comes from correctly sizing the InnoDB buffer pool, optimising queries and indexes and, where useful, adding an application cache like Redis or object cache. That’s exactly the approach we follow, without relying on outdated shortcuts.

What does cleaning up the WordPress and WooCommerce database involve?

Over time WordPress accumulates content revisions, expired transients, orphan metadata and a wp_options table bloated with autoloaded options loaded on every request. WooCommerce adds session, order and log data. We remove what’s useless, lighten the autoload and recompact the tables: the database becomes leaner, backups faster and pages more responsive. Of course with a full backup before touching anything.

Why switch from MyISAM to InnoDB?

MyISAM is a now-dated engine that locks the entire table on every write and doesn’t support transactions: on an e-commerce with many simultaneous accesses and orders it becomes a bottleneck and risks corruption. InnoDB uses row-level locking, supports transactions and is more reliable. Converting the remaining tables to InnoDB, when it’s worth it, improves concurrency and stability, especially under load.

How much does database optimisation cost?

We work on a quote basis, because every database is different in size, technology and criticality. We start with a free analysis in which we measure the database’s real state and tell you clearly what slows the site down and what we can improve. Before every intervention we always run a full backup, and we often combine database optimisation with overall speed optimisation: this way you avoid hiring an external DBA just for this and have a single point of contact who speaks Italian.

Let’s make your site fast again

We start with a free database analysis: we tell you clearly what slows the site down and how we can improve it. With a backup before every intervention and support in Italian.