SAA-C03Chapter 162 of 189Objective 3.6

RDS Performance Insights

This chapter covers Amazon RDS Performance Insights, a database performance tuning and monitoring feature that provides a visual dashboard to help you quickly assess the load on your database and determine when and where to take action. For the SAA-C03 exam, Performance Insights is a key topic under the High Performance domain (Objective 3.6), appearing in roughly 5-8% of questions, often in scenarios involving database performance troubleshooting, identifying bottlenecks, and choosing appropriate monitoring tools. Understanding how Performance Insights works, its retention periods, and its integration with other AWS services is essential for answering exam questions correctly.

25 min read
Intermediate
Updated May 31, 2026

Database Performance Dashboard with X-Ray Vision

Imagine you're a pit crew chief for a Formula 1 car. The car is your database, and the driver is your application. You have a basic dashboard showing lap times (average query latency) and fuel consumption (CPU usage). But when the car starts losing time, you need more than averages—you need to see exactly where the driver is losing tenths of a second in each corner. RDS Performance Insights is like installing a high-speed telemetry system that records every throttle press, brake application, and steering input (database waits) with microsecond precision. It doesn't just tell you the car is slow; it tells you that in Turn 3, the driver is waiting for the turbo to spool (I/O wait) because the engine mapping (query plan) is wrong. The system automatically identifies the specific corner (SQL query) causing the most time loss and ranks all the corners (queries) by their contribution to the overall lap time (DB Load). The crew chief (DBA) can then drill into that corner's telemetry (SQL text) to see exactly how the driver is approaching it (execution plan). Without this, you'd be guessing which part of the track to fix—that's the difference between Performance Insights and basic CloudWatch metrics.

How It Actually Works

What is RDS Performance Insights?

RDS Performance Insights is a database performance tuning and monitoring feature for Amazon RDS that provides an easy-to-understand visual dashboard to help you quickly assess the load on your database and determine when and where to take action. It collects and displays database load information in a format that helps you identify performance bottlenecks. Performance Insights is available for Amazon RDS for MySQL, MariaDB, PostgreSQL, Oracle, SQL Server, and Amazon Aurora (MySQL and PostgreSQL compatible editions).

Performance Insights expands on existing CloudWatch metrics by providing a more detailed view of database performance. While CloudWatch gives you aggregate metrics like CPU utilization and database connections, Performance Insights shows you the database load (measured in Average Active Sessions, or AAS) broken down by wait events, SQL queries, hosts, and users. This allows you to pinpoint exactly which query or wait event is causing high load.

How Performance Insights Works Internally

Performance Insights works by collecting performance data from the database engine. It uses a lightweight agent that runs on the database host and captures wait event information, SQL query statistics, and other performance metrics. This data is then sent to the Performance Insights service, which aggregates and stores it. The key metric is DB Load, measured in Average Active Sessions (AAS). AAS represents the average number of sessions that are actively working (not idle) during a one-second interval. The maximum DB Load is equal to the number of vCPUs on the DB instance; if DB Load consistently exceeds the number of vCPUs, the database is overloaded.

The data is stored in a time-series format and can be visualized in the AWS Management Console. The Performance Insights dashboard includes a top dimension chart that shows the top contributors to DB Load. Dimensions include: - Wait events: Specific events that cause sessions to wait (e.g., IO: DataFileRead, CPU, Lock: row lock contention). - SQL queries: Individual queries or query types (e.g., SELECT, INSERT). - Hosts: The client host from which the connection originated. - Users: The database user associated with the session.

The dashboard also includes a database load chart that shows DB Load over time, and a top SQL tab that lists the most resource-intensive SQL statements along with their execution plans and statistics.

Key Components, Values, Defaults, and Timers

- Retention period: Performance Insights offers two retention tiers: - Free tier: 7 days of performance history. This is enabled by default when you enable Performance Insights. - Full tier: 2 years (731 days) of performance history. This is a paid feature, charged per DB instance per hour. - Exam tip: The default retention is 7 days. To retain data longer, you must explicitly enable the full tier (up to 2 years). - Data granularity:

For the first 24 hours, data is stored at 1-second granularity.

After 24 hours, data is aggregated to 5-minute granularity for the free tier.

For the full tier, data is stored at 1-second granularity for the first 7 days, then 5-minute granularity for the remaining retention period.

DB Load metric: Measured in Average Active Sessions (AAS). A value of 1 means one session is active on average over the interval. The maximum useful load is the number of vCPUs.

Dimensions: Up to 10 dimensions can be analyzed. The most common are db.wait_event, db.sql_tokenized, db.host, and db.user.

Performance Insights agent: Runs as a separate process on the DB instance. It has minimal overhead (typically less than 1% CPU).

Enabling Performance Insights: Can be enabled at DB instance creation time or on an existing instance. For existing instances, you modify the DB instance and set Performance Insights to enabled. This requires a reboot (unless you enable it during maintenance window).

Permissions: To view Performance Insights data, IAM users need the rds:DescribeDBInstances and rds:DescribeDBPerformanceInsights permissions.

Configuration and Verification Commands

You can enable Performance Insights via the AWS Management Console, CLI, or API. Using the AWS CLI:

aws rds modify-db-instance \
    --db-instance-identifier mydb \
    --enable-performance-insights \
    --performance-insights-retention-period 7 \
    --apply-immediately

To verify:

aws rds describe-db-instances \
    --db-instance-identifier mydb \
    --query 'DBInstances[0].PerformanceInsightsEnabled'

To retrieve performance data programmatically:

aws pi get-resource-metrics \
    --service-type RDS \
    --identifier db-ABCDEFGHIJKLMNOP1234567890 \
    --metric-query 'Metrics=[{Metric=db.load.avg,GroupBy={Group=db.wait_event,Dimensions=[{Dimension=db.wait_event.name}]}}]' \
    --start-time 2023-01-01T00:00:00Z \
    --end-time 2023-01-01T01:00:00Z

Interaction with Related Technologies

CloudWatch: Performance Insights data is separate from CloudWatch metrics. However, you can publish custom metrics from Performance Insights to CloudWatch using the put-metric-data API if needed.

RDS Enhanced Monitoring: Enhanced Monitoring provides OS-level metrics (CPU, memory, disk I/O) at the instance level. Performance Insights focuses on database-level load. Together, they give a complete picture.

RDS Performance Insights API: You can use the Performance Insights API (pi) to retrieve data programmatically for custom dashboards or integration with third-party tools.

AWS Lambda: You can trigger Lambda functions based on Performance Insights metrics via CloudWatch alarms (if you export metrics to CloudWatch).

Amazon SNS: Alarms can send notifications when DB Load exceeds thresholds.

Common Use Cases

Identifying and troubleshooting database performance issues such as slow queries, lock contention, and I/O bottlenecks.

Capacity planning: Monitoring DB Load trends to determine when to scale up or out.

Right-sizing: Using historical data to choose appropriate instance types.

Security auditing: Identifying unusual query patterns or hosts.

Important Exam Details

Performance Insights is not a replacement for CloudWatch; it complements it.

Free tier retention is 7 days; paid tier is up to 2 years.

Data granularity: 1-second for recent data, 5-minute for older data.

Performance Insights is supported for Aurora (MySQL and PostgreSQL) and RDS for MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server.

Performance Insights does not support SQL Server Express Edition.

Enabling Performance Insights on an existing DB instance requires a reboot (unless you schedule it during maintenance window).

The db.load metric is the primary metric to watch. It represents average active sessions.

Wait events are categorized into types: CPU, IO, Lock, etc.

Performance Insights can be enabled for Multi-AZ deployments.

Performance Insights data is encrypted at rest using AWS KMS keys.

You can filter and drill down by dimensions: wait events, SQL, hosts, users.

The Performance Insights agent is automatically installed and managed by AWS.

Step-by-Step: Using Performance Insights to Diagnose a Slow Database

1.

Enable Performance Insights on the DB instance (if not already enabled).

2.

Access the Performance Insights dashboard in the RDS console.

3.

Set the time range to the period when the slowdown occurred.

4.

Examine the DB Load chart: If the load exceeds the number of vCPUs, the database is overloaded.

5.

Identify the top wait event: Click on the top dimension (e.g., IO: DataFileRead).

6.

Drill down to the top SQL: Within that wait event, see which SQL queries are contributing the most load.

7.

Analyze the SQL: Look at the SQL text, execution plan, and statistics (e.g., rows examined, rows returned).

8.

Take action: Optimize the query, add indexes, increase instance size, or scale read replicas.

9.

Monitor the impact: After changes, check the DB Load trend to verify improvement.

Common Misconfigurations and Troubleshooting

Performance Insights not enabled: Many candidates forget that it must be explicitly enabled; it's not on by default for all RDS instances.

Insufficient IAM permissions: Users need specific permissions to view Performance Insights data.

Data not appearing: Ensure the DB instance is in the supported engine list and that the instance class is large enough (Performance Insights is supported on all RDS instance classes except db.t1.micro).

Retention period misunderstanding: The default is 7 days free; longer retention incurs costs.

Confusing Performance Insights with Enhanced Monitoring: Enhanced Monitoring gives OS metrics; Performance Insights gives database load and wait events.

Walk-Through

1

Enable Performance Insights on DB Instance

You can enable Performance Insights when creating a new DB instance or by modifying an existing one. For an existing instance, use the AWS CLI command: `aws rds modify-db-instance --db-instance-identifier mydb --enable-performance-insights --performance-insights-retention-period 7 --apply-immediately`. Note that modifying an existing instance requires a reboot unless you schedule it during the maintenance window. Once enabled, the Performance Insights agent starts collecting data immediately. The agent runs as a separate process with minimal overhead (less than 1% CPU). Data is sent to the Performance Insights service every second. The default retention period is 7 days (free tier). To retain data for up to 2 years, you must specify a retention period of 731 (days) and incur additional charges.

2

Access Performance Insights Dashboard

In the RDS console, select your DB instance and click on the 'Performance Insights' tab. The dashboard loads with a default time range of the last hour. You can adjust the time range to any period within the retention window. The main components are: the DB Load chart (showing average active sessions over time), the top dimension chart (showing the top contributors to DB Load by wait event, SQL, host, or user), and the top SQL table (listing the most resource-intensive queries). You can also filter by specific dimensions to narrow down the analysis. The dashboard automatically refreshes every 5 seconds for real-time monitoring.

3

Analyze DB Load and Identify Bottlenecks

The DB Load chart displays the average number of active sessions per second. Compare the load to the number of vCPUs of your DB instance. If load consistently exceeds vCPUs, the database is over capacity. Look for spikes in load. Click on the top dimension chart to see which wait events are contributing the most. Common wait events include: 'CPU' (query is CPU-bound), 'IO:DataFileRead' (disk I/O bottleneck), 'Lock:row lock contention' (concurrency issues), 'IO:RedoLogSync' (write-heavy workload). Identify the top wait event and then drill into the top SQL queries associated with that event. This tells you exactly which queries are causing the load.

4

Drill Down to Specific SQL Queries

In the top dimension chart, select 'SQL' as the dimension. The chart now shows the top SQL queries by DB Load contribution. Click on a specific SQL digest (a tokenized version of the query) to see details: SQL text (with literal values replaced by placeholders for privacy), execution plan, and statistics like rows examined, rows returned, and average latency. You can also see the host and user that executed the query. Use this information to understand why the query is slow. For example, a query with high rows examined but low rows returned may be missing an index. The execution plan shows whether the database is using index scans or full table scans.

5

Take Corrective Action and Verify Improvement

Based on the analysis, take appropriate action. Common fixes include: adding or optimizing indexes, rewriting queries, increasing instance size (scale up), adding read replicas (scale out), or tuning database parameters (e.g., buffer pool size). After making changes, return to the Performance Insights dashboard and set the time range to include the period after the change. Monitor the DB Load chart to see if the load has decreased. Also check the top SQL chart to confirm that the problematic query is no longer a top contributor. Performance Insights provides immediate feedback, allowing you to iteratively tune performance.

What This Looks Like on the Job

Enterprise Scenario 1: E-commerce Platform During Flash Sale

A large e-commerce company runs its product catalog database on RDS for MySQL. During flash sales, the database becomes sluggish, leading to slow page loads and abandoned carts. The DBAs use Performance Insights to diagnose the issue. They enable Performance Insights with a 7-day retention (free tier) on their db.r5.4xlarge instance (16 vCPUs). During the next flash sale, they observe DB Load spiking to 30 AAS, far exceeding the 16 vCPU limit. The top wait event is 'IO:DataFileRead', and the top SQL is a query that searches for products by category without an index. They analyze the execution plan and see a full table scan on the 'products' table (10 million rows). They add a composite index on (category, price). The next flash sale, DB Load drops to 12 AAS, and page load times improve by 80%. Without Performance Insights, they would have guessed the issue was CPU or memory and scaled up unnecessarily.

Enterprise Scenario 2: Financial Services Compliance and Capacity Planning

A financial institution runs its transaction processing database on RDS for PostgreSQL with Multi-AZ. They need to retain performance data for one year for compliance purposes. They enable Performance Insights with a 731-day retention (paid tier). Over time, they use the historical data to identify that every month-end, DB Load increases due to a batch reporting query that locks rows in the 'transactions' table. They use Performance Insights to pinpoint the exact query and then schedule it during off-peak hours. They also use the data to forecast when they will need to upgrade to a larger instance class. The 2-year retention allows them to analyze year-over-year growth trends. They also set up CloudWatch alarms based on Performance Insights metrics (exported via Lambda) to notify the operations team when DB Load exceeds 80% of vCPUs for more than 5 minutes.

Scenario 3: SaaS Provider Right-Sizing Multi-Tenant Databases

A SaaS provider uses one RDS for SQL Server instance per tenant. They want to right-size each instance to minimize costs while maintaining performance. They enable Performance Insights on all instances and use the API to programmatically collect DB Load metrics. They find that many instances have DB Load below 1 AAS for 95% of the time, indicating they are over-provisioned. They downsized those instances to smaller classes, saving 40% on database costs. For a few noisy tenants, they identified specific queries causing high load and worked with the tenant to optimize their application. Performance Insights provided the granular data needed to make informed decisions without guesswork.

Common Pitfalls in Production

Not enabling Performance Insights on existing instances until a problem occurs, then having to wait for data to accumulate (no historical data before enablement).

Using the free tier only and losing data after 7 days, which is insufficient for capacity planning or compliance.

Confusing DB Load with CPU utilization: DB Load includes all wait events, not just CPU. A high DB Load with low CPU indicates I/O or lock contention.

Not using dimensions correctly: Forgetting to filter by host or user can miss security issues like a rogue application causing load.

Overlooking the need for IAM permissions: Developers need rds:DescribeDBInstances and pi:GetResourceMetrics to view Performance Insights data.

How SAA-C03 Actually Tests This

SAA-C03 Exam Focus on RDS Performance Insights

Performance Insights is tested under Objective 3.6: "Determine high-performing and/or scalable database solutions." The exam expects you to know:

When to use Performance Insights vs. CloudWatch vs. Enhanced Monitoring.

The default retention period (7 days free, up to 2 years paid).

That Performance Insights measures DB Load in Average Active Sessions (AAS).

That the maximum useful load equals the number of vCPUs.

That Performance Insights helps identify wait events, SQL bottlenecks, and top contributors.

That enabling Performance Insights on an existing instance requires a reboot.

That Performance Insights is supported for RDS and Aurora (certain engines).

Common Wrong Answers and Why Candidates Choose Them

1.

"Use CloudWatch metrics to identify the specific SQL query causing high CPU." – Wrong because CloudWatch provides aggregate metrics (CPU utilization, connections) but cannot pinpoint individual queries. Performance Insights is needed for SQL-level visibility.

2.

"Enable Enhanced Monitoring to see database load breakdown." – Enhanced Monitoring gives OS-level metrics, not database load by wait events or SQL. Candidates confuse the two.

3.

"Performance Insights data is automatically retained for 2 years." – The default is 7 days. The 2-year retention is a paid option. Many candidates assume longer retention is free.

4.

"Performance Insights can be enabled without a reboot." – For existing instances, a reboot is required unless you schedule it during maintenance. New instances can be enabled at launch without reboot.

5.

"DB Load metric shows the number of database connections." – DB Load is average active sessions, not total connections. Idle sessions are not counted.

Specific Numbers and Terms That Appear on the Exam

7 days: Default retention for free tier.

731 days: Maximum retention for paid tier (2 years).

Average Active Sessions (AAS): The unit of DB Load.

vCPUs: The threshold for overloading; if DB Load > vCPUs, the database is overloaded.

Wait events: CPU, IO:DataFileRead, Lock:row lock contention, etc.

Dimensions: db.wait_event, db.sql_tokenized, db.host, db.user.

Performance Insights API: pi service, GetResourceMetrics operation.

Supported engines: MySQL, MariaDB, PostgreSQL, Oracle, SQL Server (not Express), Aurora MySQL, Aurora PostgreSQL.

Edge Cases and Exceptions

SQL Server Express Edition does not support Performance Insights.

db.t1.micro instances do not support Performance Insights.

Aurora Serverless v1 does not support Performance Insights (v2 does).

Performance Insights data cannot be exported directly to S3; you must use the API or CloudWatch.

Performance Insights does not support cross-account access natively; you need to use resource sharing with AWS RAM (for Aurora) or IAM roles.

How to Eliminate Wrong Answers

If the question asks about identifying a specific slow query, eliminate options that mention CloudWatch or Enhanced Monitoring.

If the question mentions retention beyond 7 days, look for the paid tier option.

If the question mentions database load in terms of sessions, look for Performance Insights.

If the question involves wait events or SQL-level tuning, Performance Insights is the correct tool.

Remember that Performance Insights is a database-level tool; for OS-level metrics, use Enhanced Monitoring.

Key Takeaways

Performance Insights measures database load in Average Active Sessions (AAS); if AAS exceeds vCPUs, the database is overloaded.

Default retention is 7 days (free); paid tier allows up to 2 years (731 days).

Performance Insights breaks down load by wait events (CPU, IO, Lock), SQL queries, hosts, and users.

Enabling Performance Insights on an existing DB instance requires a reboot unless scheduled during maintenance.

Performance Insights is supported for RDS (MySQL, MariaDB, PostgreSQL, Oracle, SQL Server except Express) and Aurora (MySQL and PostgreSQL).

Use Performance Insights for SQL-level tuning and wait event analysis; use Enhanced Monitoring for OS-level metrics.

The Performance Insights API (pi) can be used to programmatically retrieve metrics.

Performance Insights data is encrypted at rest using AWS KMS.

The free tier provides 1-second granularity for the first 24 hours, then 5-minute granularity.

Performance Insights does not support SQL Server Express Edition or db.t1.micro instances.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Performance Insights

Measures database load in Average Active Sessions (AAS).

Breaks down load by wait events, SQL queries, hosts, and users.

Retention: 7 days free, up to 2 years paid.

Helps identify specific performance bottlenecks like slow queries.

Supported on RDS and Aurora (specific engines).

Enhanced Monitoring

Provides OS-level metrics (CPU, memory, disk I/O, processes).

Does not show database wait events or SQL queries.

Retention: 30 days by default (can be longer with CloudWatch Logs).

Useful for diagnosing OS-level issues like memory pressure.

Supported on all RDS engines and instance classes.

Performance Insights

Database-specific performance data (wait events, SQL).

Granularity up to 1 second for recent data.

Retention: 7 days free, up to 2 years paid.

Requires IAM permissions for viewing.

Not automatically exported to CloudWatch (needs custom integration).

CloudWatch Metrics

Aggregate metrics (CPU, connections, read/write IOPS).

Standard resolution 1 minute, high resolution 1 second (custom).

Retention: 15 months for standard resolution.

Accessible via CloudWatch console, CLI, and API.

Can trigger alarms and auto-scaling.

Watch Out for These

Mistake

Performance Insights is automatically enabled for all RDS instances.

Correct

Performance Insights must be explicitly enabled during instance creation or by modifying an existing instance. It is not enabled by default.

Mistake

Performance Insights provides the same data as CloudWatch but with a better UI.

Correct

Performance Insights provides database load broken down by wait events and SQL queries, which CloudWatch does not. CloudWatch provides aggregate metrics like CPU and connections. They are complementary.

Mistake

The default retention for Performance Insights is 2 years.

Correct

The default retention is 7 days (free tier). The 2-year retention is a paid option.

Mistake

DB Load metric represents the number of active database connections.

Correct

DB Load is measured in Average Active Sessions (AAS), which counts sessions that are actively working (not idle). It is not the same as total connections.

Mistake

Enabling Performance Insights on an existing DB instance does not require a reboot.

Correct

Modifying an existing DB instance to enable Performance Insights requires a reboot, unless you schedule the change during the next maintenance window.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the default retention period for RDS Performance Insights?

The default retention period is 7 days (free tier). You can choose a retention period of 731 days (2 years) for a fee. The retention is set per DB instance. For the free tier, data is stored at 1-second granularity for the first 24 hours, then 5-minute granularity. For the paid tier, 1-second granularity is maintained for the first 7 days, then 5-minute granularity.

How do I enable Performance Insights on an existing RDS instance?

You can enable Performance Insights by modifying the DB instance. Use the AWS CLI: `aws rds modify-db-instance --db-instance-identifier mydb --enable-performance-insights --performance-insights-retention-period 7 --apply-immediately`. This operation requires a reboot unless you schedule it during the maintenance window. You can also enable it from the RDS console under the 'Performance Insights' tab.

What is the difference between Performance Insights and Enhanced Monitoring?

Performance Insights focuses on database load (Average Active Sessions) broken down by wait events, SQL queries, hosts, and users. It helps identify database-level performance bottlenecks. Enhanced Monitoring provides OS-level metrics such as CPU, memory, disk I/O, and network usage at the instance level. They are complementary: use Performance Insights for query tuning and wait analysis, and Enhanced Monitoring for OS-level troubleshooting.

Can I export Performance Insights data to S3 or CloudWatch?

Performance Insights data cannot be directly exported to S3. However, you can use the Performance Insights API to retrieve data and then publish it to CloudWatch as custom metrics using the `put-metric-data` API. You can also build custom solutions to store data in S3. For long-term retention, consider the paid tier (up to 2 years) or export via API.

Does Performance Insights support all RDS engines?

Performance Insights is supported for Amazon RDS for MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server (except Express Edition). It is also supported for Amazon Aurora MySQL and PostgreSQL compatible editions. It is not supported for SQL Server Express or db.t1.micro instances.

How is Performance Insights billed?

Performance Insights has a free tier that includes 7 days of retention. For longer retention (up to 2 years), you are charged per DB instance per hour. The cost varies by region. There is no additional charge for the Performance Insights agent or the basic dashboard. Data transfer costs may apply if you access the API from outside the region.

What does DB Load mean in Performance Insights?

DB Load is measured in Average Active Sessions (AAS). It represents the average number of sessions that are actively working (not idle) during a one-second interval. A value of 1 means one session is active on average. The maximum useful load is equal to the number of vCPUs on the DB instance. If DB Load consistently exceeds the number of vCPUs, the database is overloaded and you may need to scale up or optimize queries.

Terms Worth Knowing

Ready to put this to the test?

You've just covered RDS Performance Insights — now see how well it sticks with free SAA-C03 practice questions. Full explanations included, no account needed.

Done with this chapter?