Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Why Your Slow-Query Log Is Lying to You (a Little)

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…

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.

A 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.

This 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.

This 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.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Why Your Full-Page Cache Needs an Opinion About Query Strings

Two different incidents on the same WordPress VIP-style multisite network, months apart, turned out to share one root cause.

  • Full-page cache key should not be determined by request contents.
  • Query strings often cause false cache misses due to tracking parameters.
  • Explicitly vary headers that genuinely affect response to prevent false caches.

Cloud costs were never a technology problem

I've been sharing what I see inside cloud accounts for months now Real accounts. Real numbers. Real messes and real fixes Here's what it all adds up to Cloud costs are not a technical problem The…

  • Cloud costs stem from human factors, not technical issues
  • Disconnection between resource provisioners and bill reviewers leads to visibility gaps
  • Regular review and documentation prevent cost crises

Temporal.io vs Cadence vs AWS Step Functions: Distributed Workflow Orchestration & State Durability

Temporal.io vs Cadence vs AWS Step Functions: Distributed Workflow Orchestration & State Durability Executive Summary & Decision Matrix All three systems solve the same core problem — durable…

  • Temporal.io and Cadence share open-source codebase, Temporal forked Cadence in 2019
  • AWS Step Functions is managed, closed-source JSON interpreter relying on AWS durability
  • Temporal/Cadence outperform AWS Step Functions in sustained workflow throughput and lower latency

More from Sunday 22 November →