Why it matters

Slow queries erode UX. Understanding diagnosis speeds fixes.

Advertisement

The architecture

Slow query log: log queries above threshold.

RS profile: per-RS metrics.

Diagnosis pathSlow query logabove thresholdRS metricsidentify hot RSRegion metricsidentify hot regionCommon: hot region from bad key design → salt or presplit
Slow query diagnosis.
Advertisement

How it works end to end

Hot region: single region receiving most traffic. Solutions: salt keys, presplit, redesign.

Compaction: high compaction queue during query. Solutions: throttle, schedule.

GC: p99 spikes correlated with GC. Solutions: tune GC + off-heap.