Database Optimisation
When every page waits on the database, everything feels slow
We analyse what your database is actually doing, fix the queries and tables that hold up page generation, and tune configuration so it copes with the traffic and data you have today.
Business impact
The hidden bottleneck behind slow admin screens and checkouts
Slow server response on every request
Pages that cannot be cached, such as carts, accounts, search results and admin screens, depend entirely on how fast the database answers.
Instability under load
A handful of inefficient queries can lock tables or exhaust connections during a sale or campaign, causing errors for every visitor.
Paying for hardware instead of fixing causes
Upgrading the server can mask a missing index for a while, but the underlying inefficiency grows with your data.
Common issues
Problems we regularly solve
Missing or unused indexes
Queries scan entire tables because the columns they filter or join on are not indexed, while other indexes exist that nothing uses.
Bloated autoloaded options in WordPress
Plugins store large settings and transient data in wp_options with autoload enabled, so it is loaded on every single page request.
Table bloat and orphaned data
Post revisions, expired transients, old sessions, logs and data left behind by removed plugins inflate tables and backups.
Inefficient queries from plugins or custom code
Unbounded meta queries, queries inside loops and searches on unindexed text columns that run acceptably on small data sets but not at scale.
Default database configuration
An InnoDB buffer pool far smaller than the working data set forces constant disk reads, regardless of how fast the server is.
Mixed or outdated storage engines
Legacy MyISAM tables with table-level locking sitting alongside InnoDB, causing contention when writes and reads overlap.
What's covered
What's included in database optimisation
Slow query analysis
Enabling and reviewing the slow query log, using EXPLAIN to understand execution plans and identifying the queries that consume the most total time.
Index design
Adding composite indexes that match real query patterns and removing redundant ones that slow down writes.
WordPress and WooCommerce clean-up
Reviewing autoloaded options, expired transients, revisions and orphaned post meta, and moving large stores towards high-performance order storage where appropriate.
Table maintenance
Identifying fragmented and oversized tables, archiving or purging data according to your retention needs and converting legacy MyISAM tables to InnoDB.
Configuration tuning
Sizing the InnoDB buffer pool, connection limits, temporary table settings and log file sizes to suit available memory and workload.
Application-level caching
Where your hosting supports it, configuring a persistent object cache such as Redis so repeated lookups do not hit the database at all.
Maintenance activities
What we do, and how often
On onboarding
- Verified backup of the database before any change
- Slow query log capture over a representative period
- Table size, engine and index inventory
- Review of current MySQL or MariaDB configuration
On demand
- Index changes tested on a staging copy of the data
- Clean-up of transients, revisions and orphaned records
- Rewriting or replacing specific slow queries in custom code
Quarterly
- Re-review of the slow query log
- Autoloaded options size check
- Growth trend for the largest tables
Our methodology
How we work
Back up and capture
We take a verified backup, then collect slow query and performance schema data over normal and busy periods.
Rank by total cost
Queries are ranked by total time consumed, not just individual duration, because a fast query run thousands of times can matter more than one slow report.
Test on a copy
Index and schema changes are tested on a staging copy with production-like data, comparing execution plans before and after.
Apply in a planned window
Changes to large tables are scheduled for low-traffic periods, using online schema change methods where the table size requires it.
Measure and document
We compare query times and server response before and after, and record every change for future reference.
Business benefits
What you gain
Faster uncached pages
Carts, account areas, search and admin screens benefit directly when the database answers more quickly.
More headroom for busy periods
Efficient queries use fewer resources, leaving more capacity for traffic peaks before errors appear.
Smaller, quicker backups
Removing orphaned and expired data reduces database size, which shortens backup and restore times.
Evidence before upgrades
You can decide on hosting upgrades knowing whether the database is genuinely constrained or simply inefficient.
Technologies supported
- MySQL
- MariaDB
- Percona Server
- InnoDB
- Slow query log
- EXPLAIN and EXPLAIN ANALYZE
- Performance Schema
- pt-query-digest
- Query Monitor
- WP-CLI
- Redis
- phpMyAdmin
Running something not listed? Ask us – we'll tell you honestly if it's a fit.
Who it's for
Who needs database optimisation?
Large WooCommerce and Magento stores
Stores with years of orders, customers and product data where admin and checkout have slowed over time.
Membership and learning platforms
Sites with many logged-in users, where pages cannot be fully cached.
Custom web applications
Applications whose queries were written for a small data set and now need indexing and tuning.
Industry guidance: E-commerce · Education · SaaS Companies
Related services
Often combined with
Database Maintenance
Verified backups, index health, version upgrades and replication checks for MySQL, PostgreSQL, MariaDB and MongoDB databases behind your applications.
Learn moreServer Performance Optimisation
Tuning PHP-FPM, Nginx, Apache or LiteSpeed, OPcache and MySQL so your server generates pages quickly and stays stable when traffic rises.
Learn moreWebsite Speed Optimisation
Faster page loads through caching, image optimisation, leaner front-end code and tuned hosting, measured against real-user data and kept fast over time.
Learn moreWooCommerce Maintenance
Order-safe updates, payment gateway checks, HPOS and template compatibility, scheduled action monitoring and backups for WooCommerce stores.
Learn moreFAQs
Database Optimisation: common questions
Is database optimisation safe to run on a live site?
Will you delete data from our database?
What are autoloaded options and why do they matter?
Do you work on databases other than MySQL?
Would a bigger server fix the problem instead?
Find the queries holding your site back
Request a technical audit and we will analyse your slow query log and table health before recommending changes.