Database optimisation is an area that is often overlooked when tackling a slow website, even though for online stores with a large catalogue and for websites with thousands of pages it is usually the main cause of a long server response time. It shows up as the page starting to display only after a longer delay, while optimising images and scripts brings only a small improvement. The solution usually involves adding indexes for the most frequent queries, rewriting inefficient search and filtering queries, limiting the number of items loaded at once, and regularly cleaning out old revisions, logs, and unused records, which build up to a considerable volume over time. Measuring the time taken by the slowest queries helps identify the cause. This is an intervention that requires a developer, but its benefit is typically an order of magnitude greater than cosmetic adjustments.
See also: Server response time, Cache and its configuration, Filters and sorting.