List query optimizer versions

Spanner provides a built-inSPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONStable to keep track of query optimizer versions. You can retrieve this datausing SQL queries.

SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS table schema

Column nameTypeDescription
VERSIONINT64The optimizer version.
RELEASE_DATEDATEThe release date of the optimizer version.
IS_DEFAULTBOOLWhether the version is the default version.

List all supported optimizer versions

SELECT*FROMSPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS

An example result:

VERSIONRELEASE_DATEIS_DEFAULT
12019-06-18false
22020-03-01false
32021-08-01true

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.