# RDS postgres historical performance analysis

**URL:** <https://awshq.com/t/rds-postgres-historical-performance-analysis/18427>\
**Category:** Databases\
**Tags:** rds\
**Created:** [May 13, 2024, 4:54am UTC](https://awshq.com/t/rds-postgres-historical-performance-analysis/18427 "2024-05-13T04:54:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Upper-Lifeguard-8478](https://awshq.com/letter_avatar_proxy/v4/letter/u/50afbb/32.png) [@Upper-Lifeguard-8478](https://awshq.com/u/Upper-Lifeguard-8478)\
**Post date:** [May 13, 2024, 4:54am UTC](https://awshq.com/t/rds-postgres-historical-performance-analysis/18427/1 "2024-05-13T04:54:16Z")

</div>

Hello,

We understand that RDS- postgres provides many built-in views of performance statistics (pg\_stat\_statements, pg\_stat\_activity, along with other views like apg\_plan\_mgmt.dba\_plans, all of which are important for real-time SQL performance troubleshooting. However, these views provide only cumulative statistics. The last database restarts or statistics are reset, and the statistics themselves reside only in memory.

When we need to troubleshoot a performance issue(mainly historical ones), we typically need to review statistics for a particular window or compare statistics between different windows. Mainly to get answers to below questions..

Why is the database running slower today? What has changed in the last 24 hours, last week, or last month?

Are there any sub-optimal SQLs?

Why is this SQL much slower than before? Has its execution plan been changed? Can we find and use a better execution plan?

What happened to the database within a specific, small window of time?

Will a new application release cause any performance issues? Do we need to increase database capacity in terms of CPU and/or IOPS? etc.

To find above , i see multiple opensource extensions available (for example pgsnapper). But i also see “performance insights” tool in the AWS itself provides historical information up to month or so, so my question was that , is it possible to query those underlying views used behind “performance insights” to analyze or debug historical database performance issues as because many times all the required information are not available in the “performance insights” user interface. And being able to query those underlying views will help us diagnosing the issues better.

* * *

**Related discussions:**

- [I am getting billed if my RDS instance is stopped?](https://awshq.com/t/i-am-getting-billed-if-my-rds-instance-is-stopped/11066)
- [Where do we use DynamoDB?](https://awshq.com/t/where-do-we-use-dynamodb/21346)
- [How to reduce the AWS costs?](https://awshq.com/t/how-to-reduce-the-aws-costs/18333)
- [AWS mumbles about its cost-busting networking tech when it should be shouting](https://awshq.com/t/aws-mumbles-about-its-cost-busting-networking-tech-when-it-should-be-shouting/21553)
- [RDS: Aurora Postgres 18.1](https://awshq.com/t/rds-aurora-postgres-18-1/21364)

---

<div class="post-metadata">

**Author:** ![zenmaster24](https://awshq.com/letter_avatar_proxy/v4/letter/z/b5a626/32.png) [@zenmaster24](https://awshq.com/u/zenmaster24)\
**Post date:** [May 13, 2024, 5:04am UTC](https://awshq.com/t/rds-postgres-historical-performance-analysis/18427/2 "2024-05-13T05:04:58Z")

</div>

Create a dashboard using the metrics you want and i think they can be visualised for something like 15 months

---

<div class="post-metadata">

**Author:** ![Upper-Lifeguard-8478](https://awshq.com/letter_avatar_proxy/v4/letter/u/50afbb/32.png) [@Upper-Lifeguard-8478](https://awshq.com/u/Upper-Lifeguard-8478)\
**Post date:** [May 13, 2024, 5:55am UTC](https://awshq.com/t/rds-postgres-historical-performance-analysis/18427/3 "2024-05-13T05:55:54Z")

</div>

> [@zenmaster24](#):
>
> Create a dashboard using the metrics you want and i think they can be visualised for something like 15 months

Thank You.

I am seeing in the create custom dash board , its having fixed defined “widgets” to add to the dashboard. But if we want to have some analysis like say for example, if the query execution plan got changed over the period of time which has caused the database performance to degraded , so we want to see what exact plan it was taking throughout and when the plan got changed and why it changed etc., I don’t see any option to do that kind of analysis from the performance insights. So do think, that is possible?

Don’t you think , for such kind of on-demand performance analysis, we have to have access to the underlying views of the performance insights, which should be queryable or else we will need some other opensource tool may be which will sample these and persist these data in the database so that it will be manually queryable for doing such kind of analysis?

---

<div class="post-metadata">

**Author:** ![zenmaster24](https://awshq.com/letter_avatar_proxy/v4/letter/z/b5a626/32.png) [@zenmaster24](https://awshq.com/u/zenmaster24)\
**Post date:** [May 13, 2024, 6:16am UTC](https://awshq.com/t/rds-postgres-historical-performance-analysis/18427/4 "2024-05-13T06:16:44Z")

</div>

> [@Upper-Lifeguard-8478](#):
>
> Thank You. I am seeing in the create custom dash board , its having fixed defined “widgets” to add to the dashboard. But if we want to have some analysis like say for example, if the query execution plan got changed …

I think you will need custom metrics - failing that, the type of stored procedure analysis and traceability you require may not be possible on rds
