Skip to main content
The SHOW RANGE... FOR ROW shows information about a for a single row in a table or index. This information is useful for verifying how SQL data maps to underlying ranges, and where the replicas for a range are located.
This feature is in and subject to change. To share feedback and/or issues, contact Support.
To show information about the ranges for all data in a table, index, or database, use the statement.

Syntax

Required privileges

The user must have the SELECT on the target table.

Parameters

ParameterDescription
tablenameThe name of the table that contains the row that you want range information about.
indexnameThe name of the index that contains the row that you want range information about.
(value1, value2, ...)The values of the indexed columns of the row that you want range information about, as a tuple. In previous releases, this statement required the values of all columns of a row.

Response

The following fields are returned:
FieldDescription
start\_keyThe start key for the range.
end\_keyThe end key for the range.
range\_idThe range ID.
lease\_holderThe node that contains the range’s .
lease\_holder\_localityThe of the leaseholder.
replicasThe nodes that contain the range .
replica\_localitiesThe of the range.

Examples

Setup

To follow along, run to start a temporary, in-memory cluster with the sample dataset preloaded:

Show range information for a row in a table

To show information about a row in a table, you must know the values of the columns in the row’s primary key:

Show range information for a row by a secondary index

To show information about a row in a secondary index, you must know the values of the indexed columns:

See also