Framework
QueryPlanner
Class: QueryPlanner
Query Planner.
Analyzes queries and produces execution plans using available indexes.
Constructors
new QueryPlanner()
new QueryPlanner(totalRecords): QueryPlannerParameters
| Parameter | Type |
|---|---|
totalRecords | number |
Returns
Methods
plan()
plan(args, indexes): QueryPlanCreate an execution plan for a query.
Parameters
| Parameter | Type | Description |
|---|---|---|
args | QueryArgs | Query arguments |
indexes | AvailableIndexes | Available indexes |
Returns
Optimal query plan
requiresPostFilter()
requiresPostFilter(plan): booleanCheck if plan requires post-filtering.
Parameters
| Parameter | Type |
|---|---|
plan | QueryPlan |
Returns
boolean
usesIndex()
usesIndex(plan): booleanCheck if a plan uses an index.
Parameters
| Parameter | Type |
|---|---|
plan | QueryPlan |
Returns
boolean
