Home icon

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.



Go to article

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

Nov 17
2026
Amazon Aurora DSQL now offers SQL statement statistics in Database Insights
Nov 11
2026
Diagnose Amazon Aurora MySQL performance using CloudWatch Database Insights
Nov 16
2026
How to use Amazon Aurora DSQL audit logs
Feb 4
2026
Auto Analyze in Aurora DSQL: Managed optimizer statistics in a multi-Region database

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.