Skip to main content
Use the SHOW ZONE CONFIGURATIONS to view details about existing .

Synopsis

show_zone syntax diagram

Required privileges

No are required to list replication zones.

Parameters

ParameterDescription
zone_nameThe name of the system for which to show .
database_nameThe name of the for which to show .
table_nameThe name of the for which to show .
partition_nameThe name of the for which to show .
index_nameThe name of the for which to show .

Examples

Setup

The following examples use MovR, a fictional vehicle-sharing application, to demonstrate CockroachDB SQL statements. For more information about the MovR example application and dataset, see . To follow along, run with the --geo-partitioned-replicas flag. This command opens an interactive SQL shell to a temporary, 9-node in-memory cluster with the movr database.

View all replication zones

View the default replication zone for the cluster

View the replication zone for a database

To control replication for a specific database, use the ALTER DATABASE ... CONFIGURE ZONE statement to define the relevant values (other values will be inherited from the parent zone):

View the replication zone for a table

To control replication for a specific table, use the ALTER TABLE ... CONFIGURE ZONE statement to define the relevant values (other values will be inherited from the parent zone):
You can also use to view zone configurations for a table. If a table is partitioned, but no zones are configured, the SHOW CREATE TABLE output includes a warning.

View the replication zone for an index

To control replication for a specific index, use the statement to define the relevant values (other values will be inherited from the parent zone):

View the replication zone for a partition

Most users should not need to use partitioning directly. Instead, they should use CockroachDB’s built-in , which automatically handle geo-partitioning and other low-level details.
Once , to control replication for a partition, use ALTER PARTITION <partition> OF INDEX <table@index> CONFIGURE ZONE:
To define replication zones for identically named partitions of a table and its secondary indexes, you can use the @* syntax to save several steps:
To view the zone configuration for a partition, use SHOW ZONE CONFIGURATION FROM PARTITION <partition> OF INDEX <table@index>:
You can also use the statement or statements to view details about all of the replication zones defined for the partitions of a table and its secondary indexes.

See also