cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.99k stars 3.79k forks source link

sql: Allow for querying of ranges via SQL #35174

Open awoods187 opened 5 years ago

awoods187 commented 5 years ago

A customer wants to be able to query a single range so that they can check the date of the values in the range and then delete them if older then a given date. They want to have as little impact as possible as possible so they want to do this on a per range basis.

Currently today the only way to do this is to take the output of SHOW EXPERIMENTAL_RANGES FROM TABLE <table> and then use that to query the primary keys using the start_key and end_key. This is not a good solution because the SHOW clause is porcelain and subject to change.

Instead, we should decode the values into a SQL format that's suitable for input in a WHERE clause.

Jira issue: CRDB-4598

github-actions[bot] commented 3 years ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 5 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!