ResultSetStats

Additional statistics about a ResultSet or PartialResultSet.

JSON representation
{
  "queryPlan": {
    object (QueryPlan)
  },
  "queryStats": {
    object
  },

  // Union field row_count can be only one of the following:
  "rowCountExact": string,
  "rowCountLowerBound": string
  // End of list of possible types for union field row_count.
}
Fields
queryPlan

object (QueryPlan)

QueryPlan for the query associated with this result.

queryStats

object (Struct format)

Aggregated statistics from the execution of the query. Only present when the query is profiled. For example, a query could return the statistics as follows:

{
  "rows_returned": "3",
  "elapsed_time": "1.22 secs",
  "cpu_time": "1.19 secs"
}
Union field row_count. The number of rows modified by the DML statement. row_count can be only one of the following:
rowCountExact

string (int64 format)

Standard DML returns an exact count of rows that were modified.

rowCountLowerBound

string (int64 format)

Partitioned DML does not offer exactly-once semantics, so it returns a lower bound of the rows modified.

QueryPlan

Contains an ordered list of nodes appearing in the query plan.

JSON representation
{
  "planNodes": [
    {
      object (PlanNode)
    }
  ]
}
Fields
planNodes[]

object (PlanNode)

The nodes in the query plan. Plan nodes are returned in pre-order starting with the plan root. Each PlanNode's id corresponds to its index in planNodes.

PlanNode

Node information for nodes appearing in a QueryPlan.plan_nodes.

JSON representation
{
  "index": integer,
  "kind": enum (Kind),
  "displayName": string,
  "childLinks": [
    {
      object (ChildLink)
    }
  ],
  "shortRepresentation": {
    object (ShortRepresentation)
  },
  "metadata": {
    object
  },
  "executionStats": {
    object
  }
}
Fields
index

integer

The PlanNode's index in node list.

kind

enum (Kind)

Used to determine the type of node. May be needed for visualizing different kinds of nodes differently. For example, If the node is a SCALAR node, it will have a condensed representation which can be used to directly embed a description of the node in its parent.

displayName

string

The display name for the node.

shortRepresentation

object (ShortRepresentation)

Condensed representation for SCALAR nodes.

metadata

object (Struct format)

Attributes relevant to the node contained in a group of key-value pairs. For example, a Parameter Reference node could have the following information in its metadata:

{
  "parameter_reference": "param1",
  "parameter_type": "array"
}
executionStats

object (Struct format)

The execution statistics associated with the node, contained in a group of key-value pairs. Only present if the plan was returned as a result of a profile query. For example, number of executions, number of rows/time per execution etc.

Kind

The kind of PlanNode. Distinguishes between the two different kinds of nodes that can appear in a query plan.

Enums
KIND_UNSPECIFIED Not specified.
RELATIONAL Denotes a Relational operator node in the expression tree. Relational operators represent iterative processing of rows during query execution. For example, a TableScan operation that reads rows from a table.
SCALAR Denotes a Scalar node in the expression tree. Scalar nodes represent non-iterable entities in the query plan. For example, constants or arithmetic operators appearing inside predicate expressions or references to column names.

ShortRepresentation

Condensed representation of a node and its subtree. Only present for SCALAR PlanNode(s).

JSON representation
{
  "description": string,
  "subqueries": {
    string: integer,
    ...
  }
}
Fields
description

string

A string representation of the expression subtree rooted at this node.

subqueries

map (key: string, value: integer)

A mapping of (subquery variable name) -> (subquery node id) for cases where the description string of this node references a SCALAR subquery contained in the expression subtree rooted at this node. The referenced SCALAR subquery may not necessarily be a direct child of this node.