Skip to content

Explain and Profile CodeQuery

query_code has three root execution modes. results is the default and returns the existing query-result object. explain lowers and selects a plan without accessing analyzer data during that phase; a host such as the one-shot CLI may still initialize and index its workspace before the request runs. profile executes the query and returns the ordinary result together with opt-in measurements. The mode is an output control: it is excluded from query-plan identity, cannot appear inside a set branch, and is not available to static-analysis policy selectors.

Set execution_mode on a JSON query:

{
"schema_version": "1",
"execution_mode": "explain",
"union": [
{"match": {"kind": "class", "name": "Legacy"}},
{"match": {"kind": "class", "name": "Replacement"}}
]
}

Or wrap an RQL query:

(profile
(references-of :proof proven
(enclosing-decl (method :name "handle"))))

Use (explain QUERY) for the planning-only form. explain and profile are mutually exclusive because both lower to the same root enum. A saved .json or .rql query may contain the mode directly, so --query-file and MCP query_file calls use the same contract.

An explanation has format bifrost_code_query_explain/v1 and these fields:

  • query_schema_version identifies the parsed CodeQuery language version. It is independent of the report contract version carried by format.
  • parsed_query is canonical JSON for the resolved query schema version, including defaults.
  • logical_plan is a dependency-first directed acyclic graph. Stable, plan-local node IDs and ordered dependency arrays expose shared work; a dependency ID may appear more than once when authored branches share the same logical seed.
  • physical_plan maps each physical node to its logical node, selected operator, output kind, and ordered physical dependencies. A semantic step also carries semantic_request, which states with eight booleans which semantic facets the step would need. Explain publishes that demand without resolving a host registration or materializing semantic artifacts. Logical and physical IDs are separate contracts even where the current planner selects them one-to-one.
  • scheduling records the scheduling policy, the selected strategy, and the maximum concurrency for the selected plan.

The explanation omits internal cache fingerprints, storage generations, representation versions, and executor-only suffix flags. Those values are implementation details, not a stable public planning contract. Explain fields lists every field.

A profile has format bifrost_code_query_profile/v2. Its result field is the exact ordinary CodeQueryResult; result ordering, diagnostics, provenance, truncation, and completion semantics do not change. The remaining fields are observations from that same execution:

  • explain contains the selected public plan described above.
  • timings_ns separates planning, execution, result rendering, and the execution-core total elapsed wall time.
  • request_timings_ns measures the whole tool request around the query: transport queueing, workspace readiness, analyzer admission, preparation, input decoding, query execution, and rendering. The MCP server fills every field. bifrost --tool query_code, bifrost --query-file, and the Rust SearchToolsService::query_code_result method also fill them, but report zero for the three transport wait fields; query_code_result also reports zero for rendering_serialization. Lower-level Rust execution functions such as execute_workspace leave every field at zero.
  • work reports budget-accounted files, source bytes, fact nodes, pipeline rows, references, provenance steps, resolved import files and edges, and semantic work. Its nested semantic object reports materialization, semantic IR element counts, cumulative work and resident and per-root work peaks across the semantic lanes, retained bytes, traversal steps, and whether the separate semantic budget was exhausted. When typestate, value-flow, or class-set type-flow analysis runs, semantic.typestate, semantic.value_flow, or semantic.type_flow adds that solver’s counters. A pure witness projection adds no solve work.
  • cache_layers reports deterministic, completeness-sensitive outcomes for request-local seed results, seed-path structural facts, reference and call relations, forward and reverse import relations, and the snapshot-local complete direct-import topology. The topology layer includes build files, edges, elapsed time, retained bytes, cancellation and unavailability, and request-local fallbacks. Only complete immutable topology values are reused; unsupported reverse domains and failed or bounded builds fall back to the request-local resolver.
  • access_path separates compatibility-budget work from physical structural access. It reports the selected positive posting terms and their pre-intersection candidate counts, provider, scoped, and candidate facts, compatibility-admitted fact nodes, whether exact source-anchor verification remained necessary, cache readiness, materialization and source inspection, index lifecycle and build cost, fallback, and uniquely retained bytes. scoped_fact_nodes is exact when indexed metadata is available and zero for scan-only execution; admitted_fact_nodes is comparable on both paths. A narrow scope may reuse a ready snapshot index. Bifrost does not build a whole-provider index for a query on its own when the scoped files are fewer than eight or less than one quarter of that provider. For a viable scope, the first use scans and records reuse interest; a later use builds the snapshot index. This avoids whole-workspace index construction for one-shot queries.
  • scheduling reports peak concurrency and, when bounded dispatch actually occurred, queue, coordinator, budget-wait, and dispatch observations.
  • operators reports authored invocation identity, disposition and termination reasons, row counts, elapsed, wait, merge, and scheduling time, work and cache deltas, truncation, cancellation, and a lower-bound temporary container-capacity estimate.

Times are monotonic elapsed wall time in nanoseconds. timings_ns.total covers the executor request core through ordinary result construction. It excludes analyzer query-scope setup and cleanup, public-report projection, serialization, transport, and host workspace initialization, so it is not end-to-end tool latency; use request_timings_ns.total for that. Operator-inclusive intervals can overlap and must not be summed as CPU time. Temporary memory excludes allocator metadata and heap payloads owned by strings, paths, traces, and nested vectors, so it is a lower bound rather than RSS or retained heap.

Cancellation fields are observable through the public Rust execute_request_with_cancellation API, which returns a profiled cancellation-safe partial result.

Profiling is opt-in: an ordinary results query does not allocate the plan explanation, operator observation vector, or per-operator timers. A profiled request may warm analyzer caches, so compare cold and warm profiles using separate, deliberately controlled analyzer and storage lifecycles. Profile fields lists every field.

The auto scheduling policy always selects the sequential_union operator. Bifrost keeps a bounded two-worker parallel_union implementation and a parity and benchmark harness, but it has no request option that forces parallel execution.

The final M4 release experiment used TypeScript workspaces of 257, 513, and 1,001 files on an Apple M4 with ten logical processors. Exact unions scanned one file per branch; broad unions scanned 128, 256, or 500 files per branch. Each warm cell used eight paired measurements, and the second round reversed stable candidate order. Representative absolute elapsed times were:

WorkspaceShapeRound 12 cold sequential / parallelRound 13 cold sequential / parallelRound 12 warm median sequential / parallelRound 13 warm median sequential / parallel
257exact4.597 / 9.001 ms10.558 / 10.252 ms5.361 / 9.459 ms5.952 / 8.559 ms
513exact16.612 / 16.946 ms36.146 / 22.976 ms15.684 / 25.430 ms31.705 / 19.476 ms
1,001exact16.647 / 31.457 ms142.964 / 38.171 ms22.798 / 35.798 ms26.796 / 50.630 ms
257broad47.622 / 44.388 ms329.183 / 69.796 ms34.340 / 37.236 ms233.110 / 112.244 ms
513broad104.182 / 91.845 ms513.850 / 297.272 ms80.580 / 83.848 ms386.303 / 151.409 ms
1,001broad841.686 / 428.313 ms877.218 / 619.713 ms222.465 / 402.767 ms782.926 / 329.696 ms

Exact cold results changed sign at every scale after candidate order reversed. Broad warm medians favored sequential at every scale in round 12 and parallel at every scale in round 13. Absolute times varied by several multiples under system load even though results, work, cache contracts, and source fingerprints stayed equal. Bifrost therefore has no stable, observable pre-execution signal for a production threshold. This is a measured negative policy, not a claim that parallel unions can never win.

Three adjacent alternatives stopped at different evidence gates:

  • bitmap-backed sets were ineligible because no stable dense identity domain was established;
  • the normalized SQL edge-table negative control was discarded after it returned a non-equivalent consumer result and lacked an exact publishable snapshot identity;
  • arbitrary recursive graph splitting remained a safety and ownership non-goal because current branch-local caches, resolver state, fair budgets, and derived dependencies do not yet have a safe general concurrent model.

A future selector must demonstrate a stable cold-and-warm crossover, an observable pre-execution cache/cardinality signal, exact result and budget parity, and behavior under concurrent request load before the auto policy can select parallel execution.

Every count is a non-negative integer. IDs are plan-local integers that are meaningful only inside one report.

FieldTypeMeaning
formatstringAlways bifrost_code_query_explain/v1.
query_schema_versionintegerCodeQuery schema version of the parsed query. The only version is 1.
parsed_queryobjectCanonical JSON for the query, with defaults filled in.
logical_planobjectThe logical plan. See Logical plan.
physical_planobjectThe selected physical plan. See Physical plan.
schedulingobjectThe scheduling decision. See Explain scheduling.
FieldTypeMeaning
logical_plan.rootintegerID of the node whose output is the query result.
logical_plan.nodesarrayLogical nodes in dependency-first order.
nodes[].idintegerLogical node ID.
nodes[].operationobjectWhat the node computes. operation.kind selects the shape below.
nodes[].output_kindstringThe row domain the node produces, such as structural_match, declaration, file, or procedure.
nodes[].dependenciesarray of integersOrdered input node IDs. An ID repeats when two authored branches share one logical node.

operation.kind values:

kindExtra fieldMeaning
seedseed: objectA structural match seed, as canonical JSON.
occurrence_seedseed: objectAn occurrence seed, as canonical JSON.
scope_seedseed: objectA lexical-scope seed, as canonical JSON.
binding_seedseed: objectA binding seed, as canonical JSON.
generation_site_seedseed: objectA generation-site seed, as canonical JSON.
export_seedseed: objectAn export seed, as canonical JSON.
path_seedseed: objectA path seed, as canonical JSON.
dependency_evidence_seedseed: objectStored static dependency evidence filters, as canonical JSON.
configuration_facts_seedseed: objectA configuration-facts seed, as canonical JSON.
stepstep: objectOne pipeline step, as canonical JSON, for example {"op": "procedure_of"}.
setop: stringA set operation: union, intersect, or except.
limitcount: integerThe public result limit.

For the seeds and steps themselves, see Code Query Vocabulary.

FieldTypeMeaning
physical_plan.rootintegerID of the physical node whose output is the query result.
physical_plan.nodesarrayPhysical nodes in dependency-first order.
nodes[].idintegerPhysical node ID.
nodes[].logical_nodeintegerID of the logical node this physical node implements.
nodes[].operatorstringThe selected operator. See the table below.
nodes[].output_kindstringThe row domain the node produces.
nodes[].dependenciesarray of integersOrdered input physical node IDs.
nodes[].semantic_requestobject, optionalPresent only on a step that needs semantic facts. See the table below.

operator values:

OperatorMeaning
seed_scanEvaluates a structural match seed.
occurrence_scanEvaluates an occurrence seed.
scope_scanEvaluates a lexical-scope seed.
binding_scanEvaluates a binding seed.
generation_site_scanEvaluates a generation-site seed.
export_scanEvaluates an export seed.
path_scanEvaluates a path seed.
dependency_evidence_scanReads the selected durable static dependency publication.
configuration_facts_scanEvaluates a configuration-facts seed.
pipeline_stepRuns one step over its input rows.
sequential_unionComputes a union, one branch at a time.
parallel_unionComputes a union on bounded parallel workers. The auto policy does not select it today.
sequential_intersectionComputes an intersection.
sequential_exceptComputes a set difference.
limitApplies the public result limit.

semantic_request has exactly these eight booleans. Each one is true when the step needs that facet:

FieldMeaning when trueSteps that set it
proceduresThe step resolves or reads source-backed procedures.Every step that has a semantic_request.
dispatchThe step resolves call dispatch targets.For example call_bindings, dispatch_outcome, dispatch_targets, class_set, absent_member, nilness_operations, and the result-contract steps.
program_pointsThe step reads control-flow program points.For example cfg_entry, cfg_exits, state_events_of, statement_reachability, guards_of.
control_edgesThe step reads control-flow edges.For example cfg_successor_edges, cfg_predecessor_edges, control_relations, loop_relations, switch_coverage.
switch_factsThe step reads switch facts.switch_coverage.
typestateThe step runs a registered typestate protocol.typestate.
value_flowThe step runs value-flow propagation.value_flow, class_set, absent_member, keyed_read_value.
taintThe step projects a registered taint result.taint.
FieldTypeMeaning
scheduling.policystringAlways auto.
scheduling.selectedstringsequential or parallel. It is parallel only when the plan contains a parallel_union node.
scheduling.max_concurrencyinteger1 for a sequential plan. For a parallel plan, the smaller of the scheduler worker count and the parallel union’s branch count.

The profile object has these top-level fields:

FieldTypeMeaning
formatstringAlways bifrost_code_query_profile/v2.
resultobjectThe ordinary query result, unchanged.
explainobjectThe explain object for the executed plan.
timings_nsobjectExecution-core times. See Timings.
request_timings_nsobjectWhole-request times. See Request timings.
workobjectBudget-accounted work for the whole request. See Work.
cache_layersarrayCache outcomes for the whole request. See Cache layers.
access_pathobjectStructural index and scan use. See Access path.
schedulingobjectObserved concurrency. See Profile scheduling.
operatorsarrayOne observation per operator invocation. See Operators.

Counters are unsigned 64-bit integers that saturate at their maximum instead of wrapping. Every time is in nanoseconds of monotonic wall time.

FieldMeaning
timings_ns.planningTime to build the plan.
timings_ns.executionTime to execute the physical plan.
timings_ns.renderingTime to build the ordinary result rows.
timings_ns.totalExecutor request-core time through ordinary result construction. It is not end-to-end tool latency.
FieldMeaning
request_timings_ns.transport_queue_waitTime from MCP request acceptance until analyzer execution starts.
request_timings_ns.workspace_readiness_waitTime from MCP request acceptance until a deferred workspace is ready. Part of transport_queue_wait.
request_timings_ns.analyzer_admission_waitTime spent waiting for an analyzer execution slot after the workspace is ready. Part of transport_queue_wait.
request_timings_ns.workspace_readySnapshot acquisition, including any wait for a deferred workspace build.
request_timings_ns.preparationRemaining request setup before input decoding.
request_timings_ns.input_decodeDecoding the query JSON or query file.
request_timings_ns.query_executionRunning the query, including the execution core measured in timings_ns.
request_timings_ns.rendering_serializationRendering and serializing the tool response.
request_timings_ns.totalThe whole request, including transport_queue_wait.

work covers the whole request. Each operators[].work has the same fields and covers one operator invocation.

FieldMeaning
scanned_filesSource files scanned.
scanned_source_bytesSource bytes scanned.
fact_nodesStructural fact nodes charged to the execution budget.
pipeline_rowsRows produced by pipeline steps.
examined_referencesReference candidates examined.
provenance_stepsProvenance steps recorded.
import_files_resolvedFiles whose imports were resolved.
import_edges_resolvedImport edges resolved.
semanticSemantic work. See below.

work.semantic fields:

FieldMeaning
materialization_attemptsAttempts to materialize a semantic artifact for a file.
unique_materialized_filesDistinct files materialized.
request_cache_hitsSemantic artifacts reused from the request-local cache.
source_bytesSource bytes read for semantic materialization.
proceduresProcedures materialized.
blocksBasic blocks materialized.
program_pointsProgram points materialized.
valuesValues materialized.
allocationsAllocation sites materialized.
call_sitesCall sites materialized.
memory_locationsMemory locations materialized.
capturesClosure captures materialized.
source_mappingsSource mappings materialized.
evidenceEvidence records materialized.
gapsRecorded gaps (facts the lowering could not model).
eventsState events materialized.
control_edgesControl-flow edges materialized.
nested_entriesNested entries materialized.
retained_bytesBytes retained by materialized semantic artifacts.
cumulativeObject. Cumulative semantic work per lane: retained admissions plus performed work. Holding and scanning the same bytes can count them twice, so this telemetry is not a bound.
resident_peaksObject. Largest live resident census per lane.
root_work_peaksObject. Largest work balance of any one root or prepass per lane.
resident_nested_entries_peakLargest resident nested-entry count.
resident_retained_bytes_peakLargest resident retained-artifact byte count.
traversal_stepsSemantic traversal steps taken.
budget_exhaustedBoolean. true when the separate semantic budget ran out.
typestateObject, present only when typestate work happened.
value_flowObject, present only when value-flow work happened.
type_flowObject, present only when class-set type-flow work happened.

cumulative, resident_peaks, and root_work_peaks each carry the same sixteen lane keys: source_bytes, procedures, blocks, program_points, values, allocations, call_sites, memory_locations, captures, source_mappings, evidence, gaps, events, control_edges, nested_entries, and owned_text_bytes. In these objects, source_bytes counts admitted or scanned source bytes rather than the materialization reads in the top-level source_bytes field, and owned_text_bytes counts artifact-owned text bytes. resident_nested_entries_peak is the nested_entries lane of resident_peaks, and resident_retained_bytes_peak repeats the retained-artifact peak that retained_bytes reports.

work.semantic.typestate fields:

FieldMeaning
solvesTypestate solves run.
cache_hitsSolves answered from cache.
summary_hits, summary_missesProcedure summary lookups that hit or missed.
summary_rejectionsSummaries found but rejected.
summary_evictionsSummaries evicted from the bounded cache.
summary_recomputationsSummaries computed again.
reached_rowsRows the solver reached.
findings, omitted_findingsFindings retained and findings omitted by the finding budget.
witnesses, omitted_witnessesWitnesses retained and witnesses omitted.
witness_steps, witness_bytesSize of the retained witnesses.
fixed_point_solvesSolves that reached a fixed point.
cancelled_solvesSolves stopped by cancellation.
budget_exhausted_solvesSolves stopped by the solver budget.
failed_solvesSolves that failed.
finding_budget_exhaustedBoolean. true when the finding budget ran out.

work.semantic.value_flow fields:

FieldMeaning
solvesValue-flow solves run.
cache_hitsSolves answered from cache.
reached_rowsRows the solver reached.
meetingsOrigin-to-observation meetings found.
sink_outcomesObservation (sink) outcomes produced.
omitted_endpointsEndpoints omitted by the endpoint cap.
witnesses, omitted_witnessesWitnesses retained and witnesses omitted.
witness_expansionsWitness expansion steps taken.
witness_steps, witness_bytesSize of the retained witnesses.
fixed_point_solvesSolves that reached a fixed point.
cancelled_solvesSolves stopped by cancellation.
budget_exhausted_solvesSolves stopped by the solver budget.
failed_solvesSolves that failed.
endpoint_truncatedBoolean. true when endpoints were omitted.
witness_truncatedBoolean. true when witnesses were omitted.

work.semantic.type_flow fields (the class_set and absent_member steps):

FieldMeaning
field_slot_buildsFresh whole-workspace field-slot indexes built.
field_slot_memory_hitsReady field-slot indexes reused from memory.
field_slot_persistence_hitsComplete stored field-slot indexes loaded and accepted.
field_slot_persistence_missesStored field-slot lookups that found no matching index.
field_slot_persistence_rejectionsStored field-slot rows found but rejected by validation.
field_slot_publicationsFresh field-slot indexes written to storage.
root_result_persistence_hitsStored finding-free root results loaded and accepted.
root_result_persistence_missesStored root-result lookups with no exact key.
root_result_persistence_rejectionsStored root results found but rejected.
root_result_store_failuresFailures while reading or writing stored root results.
root_result_publicationsFresh finding-free root results written to storage.
solvesDistinct root transactions solved.
cache_hitsSolves answered from cache.
snapshot_cache_hits, snapshot_cache_missesSnapshot cache lookups.
dispatch_cache_hits, dispatch_cache_missesDispatch cache lookups.
binding_cache_hits, binding_cache_missesBinding cache lookups.
summary_cache_hits, summary_cache_missesSummary cache lookups.
root_summary_cache_hitsRoot relations restored from reusable summaries.
root_summary_observation_rejectionsRestored root relations rejected because they lacked a meeting for a current sink.
published_summariesSummaries published for reuse.
solver_attemptsBounded solver runs. One root can need more than one.
summary_profileObject, present only when nonzero. Counts reasons a reusable summary could not be prepared, looked up, or published: preparation_call_contract, preparation_dependency, preparation_source_limit, preparation_recursive_dependency, preparation_repository_failure, preparation_surface, lookup_procedure, lookup_source_behavior, lookup_source_partition, lookup_entry, lookup_relation, lookup_live_remap, publication_incomplete_result, publication_projection, publication_entry, publication_relation_shape, publication_dispatch_reads, publication_reused_conflict, publication_transfer, publication_dependency.
class_set_rowsclass_set rows produced.
finding_rowsFinding rows produced.
witnesses, omitted_witnessesWitnesses retained and witnesses omitted.
witness_expansionsWitness expansion steps taken.
witness_steps, witness_bytesSize of the retained witnesses.
witness_truncatedBoolean. true when witnesses were omitted.
incomplete_rootsRoots whose analysis did not complete.
failed_solvesSolves that failed.

cache_layers always has nine entries, in this order. Each entry is {"layer": <name>, "metrics": {...}}. operators[].cache_layers has the same shape for one operator invocation.

layerWhat it cachesmetrics.kind
seed_resultRequest-local seed results.complete_value
seed_structural_factsStructural facts read by seed scans.structural_facts
inbound_referenceInbound reference relations.complete_value
outbound_referenceOutbound reference relations.complete_value
incoming_callIncoming call relations.complete_value
outgoing_callOutgoing call relations.complete_value
import_forwardForward import relations.complete_value
import_reverseReverse import relations.complete_value
direct_import_topologyThe snapshot-local complete direct-import topology.complete_value

complete_value metrics:

FieldMeaning
lookupsCache lookups.
hits, missesLookups that found or did not find a value.
buildsValues built.
waits, wait_nsWaits for another builder of the same key, and their total time.
complete_hits, incomplete_hitsHits on complete and on incomplete values.
complete_builds, incomplete_buildsBuilds that produced complete and incomplete values.
unknown_outcomesLookups whose completeness was unknown.
replayed_itemsCached items handed to the consumer before relation-specific filtering. This can exceed emitted rows.

direct_import_topology adds these fields:

FieldMeaning
cancelledBuilds stopped by cancellation.
unavailableLookups where the topology could not be built.
over_budgetBuilds that exceeded their budget.
fallbacksRequests that fell back to the request-local resolver.
build_files, build_edgesFiles and edges in built topologies.
build_nsTime spent building.
retained_bytesBytes retained by built topologies.

structural_facts metrics:

FieldMeaning
lookupsStructural-facts lookups by seed scans.
memory_hitsLookups answered from memory.
persisted_hydrationsLookups answered by loading stored facts.
extractionsLookups that parsed and extracted facts.
unavailableLookups for which no facts were available.
unknown_outcomesLookups with an unknown outcome.
replayed_filesFiles whose facts were replayed to the consumer.
FieldMeaning
selectedscan_only, posting:<terms> (for example posting:kind+name), or mixed when seeds used different paths. Posting terms are kind, name, role_name, and kwarg.
representation_versionVersion of the structural index representation that was used. 0 for scan-only execution.
estimated_provider_filesFiles in the structural provider, as estimated for index selection.
scoped_filesFiles inside the query’s path and language scope.
scoped_fact_nodesTotal facts in the scoped files. Exact when an index supplies metadata; 0 for scan-only execution.
admitted_fact_nodesFacts admitted by compatibility source filtering and charged to the execution budget. Comparable on both paths.
candidate_files, candidate_factsFiles and facts left after posting intersection.
selected_termsArray of {"label", "candidate_facts"}: each posting term used and its candidate count before intersection.
source_verification_requiredBoolean. true when candidates still needed exact source-anchor verification.
cache_ready_lookupsLookups that found a ready index before they started.
materialized_files, materialized_fact_nodesFiles and fact nodes materialized.
inspected_source_bytesSource bytes inspected.
examined_fact_nodesFact nodes examined by the matcher.
index_lookups, index_hits, index_missesStructural index lookups and their outcomes.
index_buildsStructural index builds.
index_waits, index_wait_nsWaits for an index build, and their total time.
index_cancelledIndex builds stopped by cancellation.
index_unavailableLookups where no index could be provided.
index_over_budgetIndex builds that exceeded their budget.
scan_fallbacksSeeds that fell back to scanning.
index_build_files, index_build_source_bytes, index_build_fact_nodes, index_build_facts_bytesSize of the inputs to index builds.
index_build_nsTime spent building indexes.
retained_bytesBytes uniquely retained by the access path.
FieldMeaning
scheduling.peak_concurrencyHighest number of operators that ran at once.
scheduling.bounded_dispatchObject, present only when bounded parallel dispatch enqueued tasks.
bounded_dispatch.worker_limitMaximum workers allowed.
bounded_dispatch.workers_spawnedWorkers started.
bounded_dispatch.tasks_enqueued, tasks_started, tasks_completedTask counts.
bounded_dispatch.tasks_observed_cancelled_before_startTasks that saw cancellation before they started.
bounded_dispatch.queue_wait_nsTime tasks waited in the queue.
bounded_dispatch.budget_wait_nsTime tasks waited for budget.
bounded_dispatch.coordinator_wait_nsTime the coordinator waited.
bounded_dispatch.dispatch_overhead_nsTime spent dispatching.
bounded_dispatch.peak_concurrencyHighest number of tasks that ran at once.

Each entry in operators describes one operator invocation. A shared plan node that runs for several branches has one entry per invocation.

FieldTypeMeaning
nodeintegerPhysical node ID.
brancharray of integersZero-based set-branch slots from the root to this invocation. Empty outside set operations.
operatorstringThe physical operator. See Physical plan.
dispositionstringcompleted; skipped, when the operator did no work of its own because cancellation arrived first or a dependency was cancelled or halted; or cancelled, when the operator saw cancellation during its own work.
timings_ns.elapsedintegerOperator-local time, excluding inline dependency execution.
timings_ns.totalintegerInclusive time from entry until the operator returned.
timings_ns.dependency_executionintegerTime spent running dependency subtrees inline.
timings_ns.dependency_waitintegerIdle time waiting for an already-running scheduled dependency.
timings_ns.mergeintegerTime spent attaching branch provenance and diagnostics and combining sets.
timings_ns.scheduling_overheadintegerReady-queue, enqueue, and dequeue overhead.
input_rowsintegerRows received from dependencies.
rows_visitedintegerInput rows the operator actually visited. Can be smaller than input_rows after cancellation or an early cap.
relation_expansionsintegerRelation expansions after relation-specific filtering, before de-duplication.
rows_discardedinteger or nullExact discarded-row count for row-to-row operators. null for expansion operators.
output_rowsintegerRows passed to the parent. A skipped operator can pass on a dependency’s partial rows.
temporary_capacity_bytes_lower_boundintegerLower bound of temporary container capacity. Excludes heap payloads owned by strings, paths, traces, and nested vectors.
workobjectWork charged to this invocation. See Work.
cache_layersarrayCache outcomes for this invocation. See Cache layers.
terminationsarray of stringsReasons the operator did not consume all available work. See below.
operator_truncatedbooleanThe operator clipped or did not fully produce its own output.
result_truncatedbooleanThe result passed upward was incomplete.
result_cancelledbooleanThe result passed upward was cancelled.

terminations values:

ValueMeaning
cancellation_before_workCancellation arrived before the operator started its own work.
cancellation_during_workCancellation arrived during the operator’s own work.
dependency_cancelledA dependency was cancelled.
dependency_pipeline_haltedA dependency halted the pipeline.
terminal_capA seed stopped at the row cap derived from the query’s terminal limit.
result_limitThe public result limit was reached.
execution_budgetThe execution budget ran out.
pipeline_budgetThe pipeline row budget ran out.
import_graph_budgetThe import-graph budget ran out.
analysis_limitAn analysis cap or budget clipped the output, for example a reference, call-relation, semantic, typestate, value-flow, or taint limit.
unsupported_analysisA language adapter or capability does not support the requested analysis.
analysis_incompleteAn analysis reported a partial or incomplete derivation.