Saved queries overview

This page describes and explains how saved queries work in Spanner.

You can use Spanner Studio to create, save, and manage SQL scripts as saved queries. The saved queries capability is available only in the Google Cloud console.

Saved queries have the following characteristics:

  • All queries are encrypted.
  • A saved query is a child of a project.
  • Saved queries are deleted when the project is deleted. If you delete the instance or database, saved queries in the project are still accessible using the Saved queries page in the Google Cloud console.
  • You must have the correct IAM role or permissions to view and manage saved queries.
  • You can only access saved queries using Spanner Studio or by navigating to the Saved queries page in the Google Cloud console. There is no API to access saved queries.

Storage location

Spanner stores all saved queries in the us-central1 region.

Limitations

Saved queries has the following limitations:

  • 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.
  • You can't use customer-managed encryption keys for instances with saved queries.

Pricing

There is no additional charge for using or storing saved queries.

What's next