QueryTrace
Defined in: libs/runtime/src/interpreter.ts:410
What the engine did for ONE query() call — counts, never times, so a regression test can
assert that a join is not a cartesian product (a real performance defect: one
subSkillsIn call evaluated ~211,000 combinations and took 32 s).
Off by default and then costs nothing: no proxy wraps the database and every hook is a single
undefined check. Enabled by the trace constructor option or TYPEDBLITE_TRACE=1, and read
with lastQueryTrace() — nothing is printed.
Member summary
Section titled “Member summary”Properties
| Name | Description |
|---|---|
| candidateRows | The rows those lookups returned. |
| candidatesCalls | candidates() lookups, and the rows they returned. |
| combinationsCreated | The sum of every stage’s output: the combinations the engine built. |
| findRelationsCalls | findRelations evaluations, relationHolds and named-relation expansion alike. |
| relationHoldsCalls | relationHolds evaluations, early (pushed-down) and final alike. |
| relationRows | Rows the relation lookups read (findRelationsCalls): role-player combinations, before they are bound. |
| stages | Output size of each stage of combinations(), in the order the stages ran. |
| statementsExecuted | Statements the engine ran during the query: its all, get, run, iterate and exec calls. |
| statementsPrepared | prepare() calls the engine made during the query. |
Properties
Section titled “Properties”candidateRows
Section titled “candidateRows”candidateRows:
number
Defined in: libs/runtime/src/interpreter.ts:422
The rows those lookups returned.
candidatesCalls
Section titled “candidatesCalls”candidatesCalls:
number
Defined in: libs/runtime/src/interpreter.ts:420
candidates() lookups, and the rows they returned.
combinationsCreated
Section titled “combinationsCreated”combinationsCreated:
number
Defined in: libs/runtime/src/interpreter.ts:414
The sum of every stage’s output: the combinations the engine built.
findRelationsCalls
Section titled “findRelationsCalls”findRelationsCalls:
number
Defined in: libs/runtime/src/interpreter.ts:418
findRelations evaluations, relationHolds and named-relation expansion alike.
relationHoldsCalls
Section titled “relationHoldsCalls”relationHoldsCalls:
number
Defined in: libs/runtime/src/interpreter.ts:416
relationHolds evaluations, early (pushed-down) and final alike.
relationRows
Section titled “relationRows”relationRows:
number
Defined in: libs/runtime/src/interpreter.ts:424
Rows the relation lookups read (findRelationsCalls): role-player combinations, before they are bound.
stages
Section titled “stages”
readonlystages:object[]
Defined in: libs/runtime/src/interpreter.ts:412
Output size of each stage of combinations(), in the order the stages ran.
combinations
Section titled “combinations”combinations:
number
stage:
string
statementsExecuted
Section titled “statementsExecuted”statementsExecuted:
number
Defined in: libs/runtime/src/interpreter.ts:428
Statements the engine ran during the query: its all, get, run, iterate and exec calls.
statementsPrepared
Section titled “statementsPrepared”statementsPrepared:
number
Defined in: libs/runtime/src/interpreter.ts:426
prepare() calls the engine made during the query.
TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.