{
  "id": 21261574,
  "title": "Why Your Slow-Query Log Is Lying to You (a Little)",
  "url": "https://urgent.news/2026/11/22/why-your-slow-query-log-is-lying-to-you-a-little",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-22T18:31:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/fettekette/why-your-slow-query-log-is-lying-to-you-a-little-5eeo"
  },
  "original_language": "en",
  "account": "Slow-query logs are useful but incomplete. They show you queries that took longer than usual to run, but they don't capture everything. They miss rarely hit queries, queries that depend on the cache's state, and problems that appeared after the log was taken.\n\nA slow-query log is like a snapshot, not a map of your site's performance. So even though you may have fixed some slow queries, there may still be other problems that the log doesn't show. To find these hidden issues, you need to execute the site yourself while profiling the queries.\n\nThis can be done with the SAVEQUERIES option in WordPress. This records every query, including its timing, into a log file. However, you should only enable it for one debugging session to avoid affecting performance. Once enabled, you can run various requests to crawl the site and capture the queries.\n\nThis profiling gives you a more complete view of your site's performance, identifying not just slow queries, but also rarely hit paths and cache state dependent issues. By analyzing the queries in a warm cache compared to a cold one, you can better understand what truly affects your site's speed.",
  "summary": "You've done the obvious work. You pulled a slow-query log off production, found the worst offenders, added indexes, rewrote a couple of queries, and shipped it. Response times improved. Everyone's happy. And yet — the site is still slow, somewhere, in a way nobody can quite pin down. An editor complains the block editor takes forever to open on the homepage. A field engineer notices the sitemap…",
  "key_points": [
    "Slow-query logs show queries over usual runtime but miss some cases",
    "They don't capture rarely hit queries or cache state dependent problems",
    "Enable SAVEQUERIES in WordPress for full query profiling during debugging"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}