Performance Insights (Avg latency(ms)/call)

1

I need to fetch the Top sql statements from RDS performance insights based on Avg latency(ms)/call and send it as pdf.

While checking the documentation, got the metric https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.UsingDashboard.AnalyzeDBLoad.AdditionalMetrics.MySQL.html db.sql_tokenized.stats.sum_timer_wait_per_call

But output says, An error occurred (InvalidArgumentException) when calling the GetResourceMetrics operation: This statistic is not a known statistic: sum_timer_wait_per_call.

Kindly help here!!

1 Answer
0

Here are a few things you could check:

  1. The documentation refers to "db.sql_tokenized.stats.sum_timer_wait_per_call" but the error indicates this is not a valid statistic name. Try using "db.sql_tokenized.stats.avg_timer_wait_per_call" instead as the metric to filter on.
  2. You can use the GetPerformanceInsights API to programmatically retrieve metrics data and SQL statements. Filter on the latency metric and sort the results to get the top statements.
  3. Alternatively, view insights directly in the RDS console to validate the data is available, then look for code samples on exporting insights data to PDF format programmatically.
AWS
Regina
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions