Skip to content

outliers: add straightforward remaining columns to node_execution_outliers #81024

@matthewtodd

Description

@matthewtodd

Epic: CRDB-13544

Jira issue: CRDB-15392

Via the feature brief, we're looking for crdb_internal.node_execution_outliers to end up looking like the below. Most of these fields will be straightforward to plumb through the outliers system; they are generally already available right at the callsite where we need them. This task is just about those fields; as we encounter difficulty here, let's spin out further issues for the remaining ones.

There is nearby work in #81023, making sure that we honor the user's roles when deciding which of these fields we're willing to show them and which need to be redacted. (Possibly everything is fine except for query?)

Also note that this list hasn't been updated since the design of the v2 insights page. A good next step will be for us to work through that design and see if the columns here still match what we'll need there.

CREATE TABLE node_execution_outliers (
  session_id                 STRING NOT NULL,
  transaction_id             UUID NOT NULL,
  transaction_fingerprint_id STRING NOT NULL,
  statement_id               STRING NOT NULL,
  statement_fingerprint_id   STRING NOT NULL,
  query                      STRING NOT NULL,
  status                     STRING NOT NULL,
  start_time                 TIMESTAMP NOT NULL,
  end_time                   TIMESTAMP NOT NULL,
  elapsed_time               FLOAT8 NOT NULL,
  full_scan                  BOOL,
  user                       STRING NOT NULL,
  application_name           STRING NOT NULL,
  database                   STRING NOT NULL,
  explain_plan               JSONB NOT NULL,
  rows_read                  INT8 NOT NULL,
  rows_written               INT8 NOT NULL,
  priority                   STRING NOT NULL,
  contention                 FLOAT8 NOT NULL,
  resource_wait_time         FLOAT8 NOT NULL,
  retryable                  BOOL,
  retries                    INT8 NOT NULL,
  last_retry_reason          STRING,
  last_contended_row         JSONB,
  regions                    JSONB,
  index_recommendation       STRING NOT NULL
);

Metadata

Metadata

Assignees

Labels

A-sql-cli-observabilityIssues related to surfacing SQL observability in SHOW, CRDB_INTERNAL, SYSTEM, etc.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions