Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR #93644 - sql: enhance SHOW RANGES (6 of 6) #15896

Open
cockroach-teamcity opened this issue Dec 23, 2022 · 1 comment
Open

PR #93644 - sql: enhance SHOW RANGES (6 of 6) #15896

cockroach-teamcity opened this issue Dec 23, 2022 · 1 comment

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Dec 23, 2022

Exalate commented:

Related PR: cockroachdb/cockroach#93644
Commit: cockroachdb/cockroach@e67d2fd


Release note (sql change): The following new statements are
introduced:

  • SHOW RANGES FROM CURRENT_CATALOG and SHOW RANGES without
    parameter: alias for SHOW RANGES FROM DATABASE on the session's
    current database.

  • SHOW RANGES FROM DATABASE ... WITH TABLES
    Reports at least one row per table. It's possible for the same
    range ID to be repeated across multiple rows, when a range spans
    multiple tables.

  • SHOW RANGES FROM DATABASE ... WITH INDEXES
    Reports at least one row per index. It's possible for the same
    range ID to be repeated across multiple rows, when a range spans
    multiple indexes.

  • SHOW RANGES FROM TABLE ... WITH INDEXES
    Reports at least one row per index. It's possible for the same
    range ID to be repeated across multiple rows, when a range spans
    multiple indexes.

  • SHOW CLUSTER RANGES [ WITH { INDEXES ]( TABLES } ) Reports ranges
    across the entire cluster, including ranges that don't contain table
    data. The behavior of WITH INDEXES and WITH TABLES is the same
    as for SHOW RANGES FROM DATABASE.

Additionally, the following new options have been added to the SHOW RANGES statement:

  • WITH KEYS: produce the raw bytes of the start/end key boundaries.
  • WITH DETAILS: produce more details, using computations that
    require extra network roundtrips. Makes the operation slower
    overall.
  • WITH EXPLAIN: produce the text of the SQL query used to
    run the statement.

Jira Issue: DOC-6472

@knz
Copy link
Contributor

knz commented Mar 27, 2023

NB: The new behavior will be opt-in in v23.1, and the old behavior becomes deprecated.
See: cockroachdb/cockroach#98979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants