Skip to content

sql: SHOW PARTITIONS FOR <table> or <index> or <database> #38436

Description

@awoods187

Table
It is not documented but users can run:

Select * from crdb_internal.partitions 
join crdb_internal.tables on partitions.table_id=tables.table_id 
where tables.name='mytable'

Database
It is not documented but users can run:

Select partitions.name from crdb_internal.partitions 
join crdb_internal.tables on partitions.table_id=tables.table_id 
where database_name='mydb

We should make SHOW statements that allow for users to see this information easily.

Metadata

Metadata

Assignees

Labels

A-partitioningA-sql-syntaxIssues strictly related to the SQL grammar, with no semantic aspectC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions