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

Document SHOW STATISTICS using JSON and INJECT STATISTICS #66061

Open
glennfawcett opened this issue Jun 3, 2021 · 2 comments
Open

Document SHOW STATISTICS using JSON and INJECT STATISTICS #66061

glennfawcett opened this issue Jun 3, 2021 · 2 comments
Labels
A-docs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects

Comments

@glennfawcett
Copy link

glennfawcett commented Jun 3, 2021

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

@glennfawcett glennfawcett added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-docs labels Jun 3, 2021
@glennfawcett glennfawcett added this to To do in Docs via automation Jun 3, 2021
@github-actions
Copy link

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!

@sheaffej
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
Docs
  
To do
Development

No branches or pull requests

2 participants