Improve performance with AlloyDB for PostgreSQL

MySQL  |  PostgreSQL  |  SQL Server

Preview

This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. You can process personal data for this feature as outlined in theCloud Data Processing Addendum, subject to the obligations and restrictions described in the agreement under which you access Google Cloud. Pre-GA features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

This page describes how to view and implement recommendations about the Cloud SQL Migrate to AlloyDB for PostgreSQLrecommender. This recommender helps you detect instances with the following characteristics:

  • The instance is critical.
  • The cache hit rate is low, which can affect performance.

Every day, this recommender proactively analyzes instance metadata and metrics about cache hit rate and provides insights and recommendationsto improve your instance performance. You can view these insights and recommendations using the Google Cloud console,gcloud CLI, or theRecommender API.

If your instance is a production instance and its cache hit rate is low, then we recommended that you migrate to AlloyDB for PostgreSQL to improve performance.Recommendations are generated daily.

Pricing

The recommenders described on this page are all in the standardRecommender pricing tier.

Before you begin

Before you can view recommendations and insights, do the following:

List performance recommendations for migrating to AlloyDB for PostgreSQL

You can list migrate to AlloyDB for PostgreSQL recommendations for improving performanceusing the Google Cloud console,gcloud CLI, or the Recommender API.

Console

To list upgrade to AlloyDB for PostgreSQL recommendations, follow these steps:

  1. Go to theCloud SQL Instances page.

    Go to Cloud SQL Instances

  2. In theImprove instance health by investigating issues and acting onrecommendations banner, clickExpand Details.

Alternatively, follow these steps:

  1. Go to theRecommendation Hub.

    Go to the Recommendation Hub

    For more information, seeGetting started with the Recommendation Hub.

  2. In theAll recommendations card, clickPerformance.

gcloud

Run thegcloud recommender insights list command as follows:

gcloud recommender recommendations list \--project=PROJECT_ID \--location=LOCATION \--recommender=google.cloudsql.instance.PerformanceRecommender \--filter=recommenderSubtype=MIGRATE_TO_ALLOYDB

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such asus-central1.

API

Call theinsights.list method as follows:

GET https://recommender.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such asus-central1.

If the recommender detects instances that can be upgraded to AlloyDB for PostgreSQL, then those instances appear in a table. Each row shows the instance name, a brief recommendation, the location, and the last refresh date.

View insights and detailed recommendations

You can view insights and detailed recommendations about instances that can be upgraded to AlloyDB for PostgreSQL using the Google Cloud console,gcloud CLI, or the Recommender API.

Console

Do one of the following:

  • On thePerformance Recommendations page, click thePerformancerecommendations card and then clickMigrate to AlloyDB.The recommendation panel appears, which contains insights and detailedrecommendations for the instance.

  • On theInstances page, clickMigrate to AlloyDB. Thelist of instances displays only those instances for which therecommendation applies.

gcloud

Run thegcloud recommender insights list command as follows:

gcloud recommender insights list \--project=PROJECT_ID \--location=LOCATION \--insight-type=google.cloudsql.instance.PerformanceInsight--filter=insightSubtype=READ_HEAVY_WORKLOAD

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such asus-central1.

API

Call theinsights.list method as follows:

GET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.cloudsql.instance.PerformanceInsight/insights

Replace the following:

  • PROJECT_ID: Your project ID.
  • LOCATION: A region where your instances are located, such asus-central1.

A panel appears showing insights about metrics or information that the Insights highlight.

Apply recommendations

To implement this recommendation, do the following:

  • To upgrade to AlloyDB for PostgreSQL:
    1. ClickMigrate to AlloyDB in theIssues column. AnUpgrade to AlloyDB window displays providing a recommendation.
    2. To proceed with an upgrade, clickEdit >Upgrade.
  • For more information about AlloyDB for PostgreSQL, see theAlloyDB for PostgreSQL documentation.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-14 UTC.