Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página descreve e explica como as consultas salvas funcionam no Spanner.
É possível usar o Spanner Studio para criar, salvar e gerenciar scripts SQL como
consultas salvas. O recurso de consultas salvas está disponível apenas no console doGoogle Cloud .
As consultas salvas têm as seguintes características:
Todas as consultas são criptografadas.
Uma consulta salva é filha de um projeto.
As consultas salvas são excluídas quando o projeto é excluído. Se você excluir a instância ou o banco de dados, as consultas salvas no projeto ainda poderão ser acessadas usando a página "Consultas salvas" no console do Google Cloud .
Só é possível acessar consultas salvas usando o Spanner Studio ou navegando até a página "Consultas salvas" no console Google Cloud . Não há uma API para acessar consultas salvas.
Local de armazenamento
O Spanner armazena todas as consultas salvas na região us-central1.
Limitações
As consultas salvas têm as seguintes limitações:
Não é possível criar mais de 10.000 consultas salvas em um projeto,incluindo consultas salvas para outros produtos do Google Cloud . Para mais informações, consulte
Cotas e limites.
[[["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-08-17 UTC."],[],[],null,["# Saved queries overview\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 Spanner.\n\nYou can use Spanner 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](/spanner/docs/create-manage-saved-queries) in the Google Cloud console.\n- You must have the correct [Identity and Access Management (IAM) role or permissions](/spanner/docs/create-manage-saved-queries#required-roles) to view and manage saved queries.\n- You can only access saved queries using the Spanner 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\nSpanner stores 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](/spanner/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](/spanner/docs/create-manage-saved-queries).\n- Learn how to [manage data using the Google Cloud console](/spanner/docs/manage-data-using-console)."]]