Platform
This is the whole path from a typed question to a returned number. Each stage names the file that implements it, so you can check the claim rather than take it.
Query pipeline
Stage names are the ones the API uses. The timings below are illustrative; the order and the stage names are not.
01
analyze
t+0ms
02
generate sql
t+180ms
03
authorize
t+240ms
04
execute
t+310ms
05
cache
t+1.19s
06
complete
t+1.24s
Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
01 · analyze · t+0ms
Which regions lost gross margin last quarter, and what moved it?
Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
02 · generate sql · t+180ms
Retained on the query record
sql_querySELECT region,
SUM(gross_margin) AS gm_q3,
LAG(SUM(gross_margin)) OVER (ORDER BY quarter) AS gm_q2
FROM fct_margin
WHERE org_id = current_setting('app.org_id')::uuid
GROUP BY region, quarter;Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
03 · authorize · t+240ms
SELECT set_config('app.org_id', $1, true);
-- bound per transaction, from the caller's sessionWhere the scope is enforced
Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
04 · execute · t+310ms
Sources read
share of result setProgress is sent over a WebSocket at the real execution boundaries.
Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
05 · cache · t+1.19s
Result cache entry
Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
06 · complete · t+1.24s
Audit event
Illustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
After the answer
An answer is only reviewable if the path to it survives. These four things are kept on every completed query and can be read back per organization.
01
The generated SQL is stored on the record as sql_query, beside the question that produced it.
02
Execution time in milliseconds, rows returned, and the created and completed timestamps.
03
The identifiers of every data source the statement ran against.
04
Event, action, result, organization, user, and request id, queryable per organization.
Query record
models.QueryIllustrative trace. Stage names match the query pipeline; the example question and its figures are not customer data.
Next
The fastest evaluation is a session against one of your own sources, with your own reviewers reading the trace.