Not all index scans are equal: How we cut query latency by over 99%
Datadog | The Monitor blog

Not all index scans are equal: How we cut query latency by over 99%


Summary

Datadog engineers optimized a slow PostgreSQL query by replacing an inefficient composite index scan with a targeted index that better matches the query's predicates. This change, which addressed a mismatch in B-tree column order, slashed average query latency from 300 ms to just 38 μs. Additionally, the article highlights how Datadog Database Monitoring can now automatically detect and suggest remedies for similar suboptimal index scans.
Read the Original Article

This article originally appeared on Datadog | The Monitor blog.

Read Full Article on Original Site

Popular from Datadog | The Monitor blog

1
Understand session replays faster with AI summaries and smart chapters
Understand session replays faster with AI summaries and smart chapters

Datadog | The Monitor blog Apr 2, 2026 33 views

2
Datadog achieves ISO 42001 certification for responsible AI
Datadog achieves ISO 42001 certification for responsible AI

Datadog | The Monitor blog Mar 26, 2026 29 views

3
Analyzing round trip query latency
Analyzing round trip query latency

Datadog | The Monitor blog Mar 27, 2026 26 views

4
Introducing our open source AI-native SAST
Introducing our open source AI-native SAST

Datadog | The Monitor blog Apr 10, 2026 23 views

5
Introducing the Datadog Code Security MCP
Introducing the Datadog Code Security MCP

Datadog | The Monitor blog Apr 7, 2026 23 views