Use query statistics to find slow and expensive queries in Aurora DSQL
Database Blog
This article demonstrates how to use query statistics in Amazon Aurora DSQL to identify and fix slow, expensive queries that impact application performance and database costs.
- Query statistics track per-SQL metrics including calls, latency, rows scanned, compute/storage time, and DPU consumption
- Access metrics via CloudWatch Database Insights SQL metrics tab or CloudWatch Query Studio with PromQL queries
- Walkthrough shows Order history query scanning 5.17M rows to return 20, consuming 656 DPU per call
- Adding index on customer_id and created_at reduced latency from 12 seconds to 2.6ms and DPU from 656 to 0.015
- Missing index would cost approximately $1,574 per month at 10,000 calls daily
- Query statistics complement sampled DASH metrics by recording aggregated per-statement data on completion
Query statistics enable cost-effective performance optimization by attributing DPU consumption and latency to specific SQL statements, helping teams identify and fix inefficient queries before deployment.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
2026
2026
2026
2026
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.