-
Notifications
You must be signed in to change notification settings - Fork 474
21.2 crdb_internal tables #11902
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
21.2 crdb_internal tables #11902
Conversation
Files changed: |
✔️ Netlify Preview 🔨 Explore the source changes: e5cc47e 🔍 Inspect the deploy log: https://app.netlify.com/sites/cockroachdb-docs/deploys/61686d9c881f3f000751ab0d 😎 Browse the preview: https://deploy-preview-11902--cockroachdb-docs.netlify.app/docs/v21.2/crdb-internal |
@rmloveland Adding you to review, as some of these tables touch on KV stuff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Mostly squawking about more cowbell links
v21.2/crdb-internal.md
Outdated
`active_range_feeds` | Contains information about [range feeds](architecture/distribution-layer.html) on nodes in your cluster. | ||
`backward_dependencies` | Contains information about backward dependencies. | ||
`builtin_functions` | Contains information about supported [functions](functions-and-operators.html). | ||
`cluster_contended_indexes` | Contains information about contended indexes in your cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these contended things are due to transaction contention (are they being contended on during transactions?), it would be good to link to our transaction contention stuff
`cluster_contended_tables` | Contains information about contended tables in your cluster. | ||
`cluster_contention_events` | Contains information about contention in your cluster. | ||
`cluster_database_privileges` | Contains information about the [database privileges](authorization.html#privileges) on your cluster. | ||
`cluster_distsql_flows` | Contains information about the flows of the [DistSQL execution](architecture/sql-layer.html#distsql) scheduled in your cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noice
v21.2/crdb-internal.md
Outdated
`cluster_transactions` | Contains information about transactions running on your cluster. | ||
`create_statements` | Contains information about tables and indexes in your database. | ||
`create_type_statements` | Contains information about [user-defined types](enum.html) in your database. | ||
`cross_db_references` | Contains information about objects that reference other objects across databases in your cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be good to say something like "other objects such as foreign keys or views" since the FK and view docs make reference to cross-DB things, e.g. from FK doc:
By default, referenced columns must be in the same database as the referencing foreign key column. To enable cross-database foreign key references, set the
sql.cross_db_fks.enabled
cluster setting totrue
.
`gossip_network` | Contains information about your cluster's gossip network. | ||
`gossip_nodes` | Contains information about nodes in your cluster's gossip network. | ||
`index_columns` | Contains information about indexed columns in your cluster. | ||
`index_usage_statistics` | Contains index usage statistics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index could link to https://www.cockroachlabs.com/docs/dev/indexes.html
`interleaved` | Contains information about [interleaved objects](interleave-in-parent.html) in your cluster. | ||
`invalid_objects` | Contains information about invalid objects in your cluster. | ||
`jobs` | Contains information about [jobs](show-jobs.html) running on your cluster. | ||
`kv_node_liveness` | Contains information about [node liveness](cluster-setup-troubleshooting.html#node-liveness-issues). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noice++
`kv_node_status` | Contains information about node status at the [key-value layer](architecture/storage-layer.html). | ||
`kv_store_status` | Contains information about the key-value store for your cluster. | ||
`leases` | Contains information about [leases](architecture/replication-layer.html#leases) in your cluster. | ||
`lost_descriptors_with_data` | Contains information about table descriptors that have been deleted but still have data left over in storage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we mention 'table descriptors' in a couple places but we don't have real docs, kinda wish we did
(aha! just found #9218 - cool)
anyway nothing for us to do here in this PR, carry on :-)
v21.2/crdb-internal.md
Outdated
`predefined_comments` | Contains predefined comments about your cluster. | ||
`ranges` | Contains information about ranges in your cluster. | ||
`ranges_no_leases` | Contains information about ranges in your cluster, without leases. | ||
`regions` | Contains information about cluster [regions](multiregion-overview.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be even more nerdtastic if this link were to the 'cluster regions' heading
(please don't kill me lol)
v21.2/crdb-internal.md
Outdated
`schema_changes` | Contains information about schema changes in your cluster. | ||
`session_trace` | Contains session trace information for your cluster. | ||
`session_variables` | Contains information about [session variables](set-vars.html) in your cluster. | ||
`statement_statistics` | Contains information about statement statistics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK if either this or the transaction_statistics
below have anything to do with the statistics created and used by the optimizer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTR @rmloveland !
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @Azhng, @rafiss, and @rmloveland)
v21.2/crdb-internal.md, line 27 at r1 (raw file):
Great point. Done for all 4 settings.
If these contended things are due to transaction contention
I believe they are.
v21.2/crdb-internal.md, line 40 at r1 (raw file):
Previously, rmloveland (Rich Loveland) wrote…
might be good to say something like "other objects such as foreign keys or views" since the FK and view docs make reference to cross-DB things, e.g. from FK doc:
By default, referenced columns must be in the same database as the referencing foreign key column. To enable cross-database foreign key references, set the
sql.cross_db_fks.enabled
cluster setting totrue
.
Done!
v21.2/crdb-internal.md, line 50 at r1 (raw file):
Previously, rmloveland (Rich Loveland) wrote…
index could link to https://www.cockroachlabs.com/docs/dev/indexes.html
Done.
v21.2/crdb-internal.md, line 75 at r1 (raw file):
Previously, rmloveland (Rich Loveland) wrote…
this could be even more nerdtastic if this link were to the 'cluster regions' heading
(please don't kill me lol)
Lol done.
v21.2/crdb-internal.md, line 79 at r1 (raw file):
Previously, rmloveland (Rich Loveland) wrote…
IDK if either this or the
transaction_statistics
below have anything to do with the statistics created and used by the optimizer ?
I think these are separate from the optimizer's table statistics. Like these are more about query stats and such, rather than table-specific stats surfaced by SHOW STATISTICS FOR TABLE <onetable>
.
I think the statement_statistics and transaction_statistics relates more to what is displayed in the console Statements Page and Transactions Page, but I'm not sure if those pages pull from these.
@Azhng Do you know how/where/if these stats are being exposed to users other than in these crdb_internal
tables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @rmloveland)
v21.2/crdb-internal.md, line 79 at r1 (raw file):
these are more about query stats and such, rather than table-specific stats surfaced by SHOW STATISTICS FOR TABLE .
This is correct
I think the statement_statistics and transaction_statistics relates more to what is displayed in the console Statements Page and Transactions Page, but I'm not sure if those pages pull from these.
This is also correct. Statement Page and Transaction Page does pull data from crdb_internal.statement_statistics
and crdb_internal.transaction_statistics
how
We exposed a backend HTTP API endpoint at /_status/statements
(though we discourage user from building things on top of those endpoints) which send back data it scanned from crdb_internal.statement_statistics
and crdb_internal.transaction_statistics
virtual tables
Statement Page and Transaction Page uses the data they fetch from the said API endpoint.
3e576c3
to
e5cc47e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @rafiss and @rmloveland)
v21.2/crdb-internal.md, line 79 at r1 (raw file):
Previously, Azhng (Archer Zhang) wrote…
these are more about query stats and such, rather than table-specific stats surfaced by SHOW STATISTICS FOR TABLE .
This is correct
I think the statement_statistics and transaction_statistics relates more to what is displayed in the console Statements Page and Transactions Page, but I'm not sure if those pages pull from these.
This is also correct. Statement Page and Transaction Page does pull data from
crdb_internal.statement_statistics
andcrdb_internal.transaction_statistics
how
We exposed a backend HTTP API endpoint at
/_status/statements
(though we discourage user from building things on top of those endpoints) which send back data it scanned fromcrdb_internal.statement_statistics
andcrdb_internal.transaction_statistics
virtual tablesStatement Page and Transaction Page uses the data they fetch from the said API endpoint.
Awesome. Makes sense. Thank you @Azhng !
Fixes #11346.
Fixes #11300.
Fixes #11432.
Fixes #11446.
Fixes #11302.
Fixes #11486.
Fixes #11364.
Fixes #11271.
Fixes #11349.