---
id: ADR-PFM-QRY-004
title: The query executor is shared across query consumers
product_area: platform
module: queries
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  The semantic query executor supplies interactive answers, exports, scheduled queries, populations,
  Explorer operations and drafting test runs, while specialized persistence and snapshot generation
  retain their own database operations.
constrains:
  - SVC-PFM-QRY-queries
  - SVC-PFM-QRY-explorer
  - SVC-PFM-QRY-quick-search
  - WF-PFM-QRY-006
  - WF-PFM-QRY-012
  - WF-PFM-QRY-013
  - DOM-PFM-QRY-002
origin: docs/migrations/query-scheduling-exports/README.md D1
alternatives:
  - option: Build a separate export executor
    why_not: 'Exported columns, values and order could diverge from interactive results.'
  - option: Bypass datasets for record populations
    why_not: Dataset access and workspace restrictions would need a second implementation.
consequences:
  - Changes to query execution affect multiple consumers.
  - Query export workers retrieve pages of one thousand rows with a fifteen-second statement limit.
supersedes: []
evidence:
  - >-
    services-platform at ad3f6a6: modules/queries/services/execute/run-query.ts,
    ordered-record-ids.ts
---

# The query executor is shared across query consumers

## Context

Screens and downstream consumers need the same interpretation of a query.

## Decision

The semantic query executor supplies interactive answers, exports, scheduled queries, populations, Explorer operations and drafting test runs, while specialized persistence and snapshot generation retain their own database operations.

## Alternatives Considered

Build a separate export executor: Exported columns, values and order could diverge from interactive results.

Bypass datasets for record populations: Dataset access and workspace restrictions would need a second implementation.

## Consequences

Changes to query execution affect multiple consumers. Query export workers retrieve pages of one thousand rows with a fifteen-second statement limit.
