Open florence-crl opened 4 years ago
cc @awoods187, @ericharmeling, @ianjevans, not sure if this query still matches the Statements page.
It does not but we will want to document this. Moving forward, we want everything to be available within the SQL shell, the DB console, or as metrics exportable to prometheus where possible. We will need to think about our approach for making sure that both the product and the documentation reflect ways for developers to access the relevant information by their preferred methodology.
Kevin Ngo (kevin-v-ngo) commented: Related doc improvement: https://cockroachlabs.atlassian.net/browse/DOC-2077
Florence Morris (florence-crl) commented:
This query gets the same data as the UI Statements page (from https://forum.cockroachlabs.com/t/detecting-slow-sql-queries/3512/2) select key as "STATEMENT", implicit_txn as "TXN TYPE", count::float * service_lat_avg as "TIME", count as "EXECUTION COUNT", max_retries as "RETRIES", rows_avg as "ROWS AFFECTED", service_lat_avg as "LATENCY" from crdb_internal.node_statement_statistics order by "TIME" desc
Jira Issue: DOC-461