Melhorar o desempenho com o AlloyDB para PostgreSQL
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
MySQL | PostgreSQL | SQL Server
Esta página descreve como visualizar e implementar recomendações sobre o recomendador do Cloud SQL Migrate para o AlloyDB para PostgreSQL. Esse recomendador ajuda a detectar instâncias com as seguintes características:
A instância é essencial.
A taxa de ocorrência em cache é baixa, o que pode afetar o desempenho.
Todos os dias, esse recomendador analisa proativamente os metadados e as métricas da instância sobre a taxa de ocorrência em cache e fornece insights e recomendações.
para melhorar o desempenho da instância. Esses insights e recomendações podem ser acessados no console do Google Cloud ,
na gcloud CLI ou na API Recommender.
Se a instância for de produção e a taxa de ocorrência em cache for baixa, recomendamos migrar para o AlloyDB para PostgreSQL para melhorar o desempenho.
As recomendações são geradas diariamente.
Listar recomendações de desempenho para migrar para o AlloyDB para PostgreSQL
É possível listar recomendações de migração para o AlloyDB para PostgreSQL para melhorar o desempenho
usando o console Google Cloud , gcloud CLI ou a API Recommender.
Console
Para listar as recomendações de upgrade para o AlloyDB para PostgreSQL, siga estas etapas:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations
Substitua:
PROJECT_ID: o ID do projeto.
LOCATION: uma região em que suas instâncias estão localizadas, como us-central1.
Se o recomendador detectar instâncias que podem ser atualizadas para o AlloyDB para PostgreSQL, elas aparecerão em uma tabela. Cada linha mostra o nome da instância, uma breve recomendação, o local e a data da última atualização.
Ver insights e recomendações detalhadas
É possível conferir insights e recomendações detalhadas sobre instâncias que podem ser atualizadas para o AlloyDB para PostgreSQL usando o console Google Cloud , gcloud CLI ou a API Recommender.
Console
Escolha uma destas opções:
Na página Recomendações de desempenho, clique em Recomendações de desempenho e clique em Migrar para o AlloyDB.
O painel de recomendações é exibido, contendo insights e recomendações detalhadas para a instância.
Na página Instâncias, clique em Migrar para o AlloyDB. A lista de instâncias exibe apenas aquelas a que a recomendação se aplica.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[],[],null,["# Improve performance with AlloyDB for PostgreSQL\n\n\u003cbr /\u003e\n\nMySQL \\| PostgreSQL \\| SQL Server\n\n\u003cbr /\u003e\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| You can process personal data for this feature as outlined in the\n| [Cloud Data Processing\n| Addendum](/terms/data-processing-addendum), subject to the obligations and restrictions described in the agreement under\n| which you access Google Cloud.\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page describes how to view and implement recommendations about the Cloud SQL Migrate to AlloyDB for PostgreSQL [recommender](/recommender/docs/overview). This recommender helps you detect instances with the following characteristics:\n\n- The instance is critical.\n- The cache hit rate is low, which can affect performance.\n\nEvery day, this recommender proactively analyzes instance metadata and metrics about cache hit rate and provides insights and recommendations\nto improve your instance performance. You can view these insights and recommendations using the Google Cloud console,\n[gcloud CLI](/sdk/gcloud), or the [Recommender API](/recommender/docs/using-api).\n\nIf 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.\nRecommendations are generated daily.\n\nPricing\n-------\n\nThe recommenders described on this page are all in the standard [Recommender pricing tier](/recommender/pricing).\n\nBefore you begin\n----------------\n\nBefore you can view recommendations and insights, do the following:\n\n- To get the permissions to view and work with insights and recommendations, ensure that you have the required [roles](/sql/docs/postgres/project-access-control#roles).\n\n For more information about roles, see [understanding roles](/iam/docs/understanding-roles) and [granting Identity and Access Management (IAM) permissions](/iam/docs/granting-changing-revoking-access).\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\n### List performance recommendations for migrating to AlloyDB for PostgreSQL\n\nYou can list migrate to AlloyDB for PostgreSQL recommendations for improving performance\nusing the Google Cloud console, [gcloud CLI](/sdk/gcloud), or the Recommender API. \n\n### Console\n\nTo list upgrade to AlloyDB for PostgreSQL recommendations, follow these steps:\n\n1. Go to the **Cloud SQL Instances** page.\n\n [Go to Cloud SQL Instances](https://console.cloud.google.com/sql/instances)\n2. In the **Improve instance health by investigating issues and acting on\n recommendations** banner, click **Expand Details**.\n\nAlternatively, follow these steps:\n\n1. Go to the **Recommendation Hub**.\n\n [Go to the Recommendation Hub](https://console.cloud.google.com/home/recommendations/)\n\n For more information, see [Getting started with the Recommendation Hub](/recommender/docs/recommendation-hub/identify-configuration-problems).\n2. In the **All recommendations** card, click **Performance**.\n\n### gcloud\n\nRun the [`gcloud recommender insights list`](/sdk/gcloud/reference/recommender/insights/list) command as follows: \n\n```\ngcloud recommender recommendations list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--recommender=google.cloudsql.instance.PerformanceRecommender \\\n--filter=recommenderSubtype=MIGRATE_TO_ALLOYDB\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region where your instances are located, such as `us-central1`.\n\n### API\n\nCall the [`insights.list`](/recommender/docs/reference/rest/v1/projects.locations.insightTypes.insights/list) method as follows: \n\n```\nGET https://recommender.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region where your instances are located, such as `us-central1`.\n\nIf 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.\n\n### View insights and detailed recommendations\n\nYou can view insights and detailed recommendations about instances that can be upgraded to AlloyDB for PostgreSQL using the Google Cloud console, [gcloud CLI](/sdk/gcloud), or the Recommender API. \n\n### Console\n\nDo one of the following:\n\n- On the **Performance Recommendations** page, click the **Performance\n recommendations** card and then click **Migrate to AlloyDB**.\n The recommendation panel appears, which contains insights and detailed\n recommendations for the instance.\n\n- On the **Instances** page, click **Migrate to AlloyDB**. The\n list of instances displays only those instances for which the\n recommendation applies.\n\n### gcloud\n\nRun the [`gcloud recommender insights list`](/sdk/gcloud/reference/recommender/insights/list) command as follows: \n\n```\ngcloud recommender insights list \\\n--project=PROJECT_ID \\\n--location=LOCATION \\\n--insight-type=google.cloudsql.instance.PerformanceInsight\n--filter=insightSubtype=READ_HEAVY_WORKLOAD\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region where your instances are located, such as `us-central1`.\n\n### API\n\nCall the [`insights.list`](/recommender/docs/reference/rest/v1/projects.locations.insightTypes.insights/list) method as follows: \n\n```\nGET https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.cloudsql.instance.PerformanceInsight/insights\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: A region where your instances are located, such as `us-central1`.\n\nA panel appears showing insights about metrics or information that the Insights highlight.\n\n### Apply recommendations\n\nTo implement this recommendation, do the following:\n\n- To upgrade to AlloyDB for PostgreSQL:\n 1. Click **Migrate to AlloyDB** in the **Issues** column. An **Upgrade to AlloyDB** window displays providing a recommendation.\n 2. To proceed with an upgrade, click **Edit** \\\u003e **Upgrade**.\n- For more information about AlloyDB for PostgreSQL, see the [AlloyDB for PostgreSQL documentation](/alloydb/docs).\n\nWhat's next\n-----------\n\n- [Google Cloud recommenders](/recommender/docs/recommenders)\n- [About database observability](/sql/docs/postgres/observability)"]]