Meningkatkan performa dengan AlloyDB untuk PostgreSQL
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
MySQL | PostgreSQL | SQL Server
Halaman ini menjelaskan cara melihat dan menerapkan rekomendasi tentang pemberi rekomendasi Cloud SQL Migrate to AlloyDB for PostgreSQL. Pemberi rekomendasi ini membantu Anda mendeteksi instance dengan karakteristik berikut:
Instance ini sangat penting.
Rasio hit cache rendah, yang dapat memengaruhi performa.
Setiap hari, sistem pemberi rekomendasi ini secara proaktif menganalisis metadata dan metrik instance tentang rasio hit cache serta memberikan insight dan rekomendasi
untuk meningkatkan performa instance Anda. Anda dapat melihat insight dan rekomendasi ini menggunakan konsol Google Cloud ,gcloud CLI, atau Recommender API.
Jika instance Anda adalah instance produksi dan rasio hit cache-nya rendah, sebaiknya Anda bermigrasi ke AlloyDB untuk PostgreSQL guna meningkatkan performa.
Rekomendasi dibuat setiap hari.
Mencantumkan rekomendasi performa untuk bermigrasi ke AlloyDB untuk PostgreSQL
Anda dapat membuat daftar rekomendasi migrasi ke AlloyDB untuk PostgreSQL guna meningkatkan performa
menggunakan konsol Google Cloud , gcloud CLI, atau Recommender API.
Konsol
Untuk membuat daftar rekomendasi upgrade ke AlloyDB untuk PostgreSQL, ikuti langkah-langkah berikut:
GET https://recommender.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations
Ganti kode berikut:
PROJECT_ID: Project ID Anda.
LOCATION: Region tempat instance Anda berada, seperti us-central1.
Jika mendeteksi instance yang dapat diupgrade ke AlloyDB untuk PostgreSQL, pemberi rekomendasi akan menampilkannya dalam tabel. Setiap baris menampilkan nama instance, rekomendasi singkat, lokasi, dan tanggal pembaruan terakhir.
Lihat insight dan rekomendasi mendetail
Anda dapat melihat insight dan rekomendasi mendetail tentang instance yang dapat diupgrade ke AlloyDB untuk PostgreSQL menggunakan konsol Google Cloud , gcloud CLI, atau Recommender API.
Konsol
Lakukan salah satu hal berikut:
Di halaman Rekomendasi Performa, klik kartu Rekomendasi performa, lalu klik Migrasikan ke AlloyDB.
Panel rekomendasi akan muncul, yang berisi insight dan rekomendasi mendetail untuk instance tersebut.
Di halaman Instances, klik Migrate to AlloyDB. Daftar instance hanya menampilkan instance yang rekomendasi berlaku untuknya.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)"]]