Open glennfawcett opened 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 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
This is still relevant, as the SHOW STATISTICS docs do not currently show the syntax for USING JSON, nor is there a page that I can find that describes how to inject these statistics into another cluster.
Is your feature request related to a problem? Please describe. Need to Document
SHOW STATISTICS USING JSON FOR TABLE ...
ALTER TABLE... INJECT STATISTICS
Describe the solution you'd like Docs to be created as mentioned above
Additional context
This is an example of what I am doing to copy statistics from one table to another...
cockroach sql -e 'show statistics using json for table kv.kv' --insecure --format raw | grep -v '^#' | while read s do echo "ALTER TABLE kv.kv2 INJECT STATISTICS '$s';" | cockroach sql --insecure done
Jira issue: CRDB-7865