Halaman ini menjelaskan cara kerja kueri tersimpan di Cloud SQL untuk MySQL
.
Anda dapat menggunakan Cloud SQL Studio
untuk membuat, menyimpan, dan mengelola skrip SQL sebagai kueri tersimpan. Kemampuan kueri tersimpan hanya tersedia di konsol Google Cloud .
Kueri tersimpan memiliki karakteristik berikut:
Semua kueri dienkripsi.
Kueri tersimpan adalah turunan dari project.
Kueri tersimpan akan dihapus saat project dihapus. Jika menghapus
instance atau database, Anda masih dapat mengakses kueri tersimpan di project menggunakan
halaman Kueri tersimpan
di konsol Google Cloud .
Anda hanya dapat mengakses kueri tersimpan menggunakan Cloud SQL Studio atau dengan membuka halaman Kueri tersimpan di konsol Google Cloud . Kueri tersimpan tidak dapat diakses melalui API.
Lokasi penyimpanan
Cloud SQL untuk MySQL menyimpan semua kueri tersimpan di region us-central1.
Batasan
Kueri tersimpan memiliki batasan berikut:
Anda tidak dapat membuat lebih dari 10.000 kueri tersimpan dalam satu project—termasuk kueri tersimpan untuk produk Google Cloud lainnya. Untuk mengetahui informasi selengkapnya, lihat
Kuota dan batas
.
[[["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,["# Saved queries overview\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/saved-queries \"View this page for the PostgreSQL database engine\") \\| [SQL Server](/sql/docs/sqlserver/saved-queries \"View this page for the SQL Server database engine\")\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| 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 saved queries work in Cloud SQL for MySQL\n.\n\nYou can use Cloud SQL Studio\nto create, save, and manage SQL scripts as saved queries. The saved queries capability is\navailable only in the Google Cloud console.\n\nSaved queries have the following characteristics:\n\n- All queries are encrypted.\n- A saved query is a child of a project.\n- Saved queries are deleted when the project is deleted. If you delete the instance or database, you can still access saved queries in the project using the [**Saved queries** page](/sql/docs/mysql/create-manage-saved-queries) in the Google Cloud console.\n- You must have the correct [Identity and Access Management (IAM) role or permissions](/sql/docs/mysql/create-manage-saved-queries#required-roles) to view and manage saved queries.\n- You can only access saved queries using the Cloud SQL Studio or by navigating to the **Saved queries** page in the Google Cloud console. Saved queries aren't accessible through the API.\n\nStorage location\n----------------\n\nCloud SQL for MySQL\nstores all saved\nqueries in the `us-central1` region.\n\nLimitations\n-----------\n\nSaved queries has the following limitations:\n\n- You can't create more than 10,000 saved queries in a project---including saved queries for other Google Cloud products. For more information, see [Quotas and limits](/sql/docs/quotas) .\n- You can't use [customer-managed encryption keys](/spanner/docs/cmek) for instances with saved queries.\n\nPricing\n-------\n\nThere is no additional charge for using or storing saved queries.\n\nWhat's next\n-----------\n\n- Learn how to [create and manage saved queries](/sql/docs/mysql/create-manage-saved-queries) .\n- Learn how to [manage data using the Google Cloud console](/sql/docs/mysql/manage-data-using-studio) ."]]