How TeselaDB chooses an index
What the cost-based planner does and how to see the plan it chose.
TeselaDB's planner chooses the plan of each query by cost, with statistics of the data. It keeps the chosen plan in the plan cache.
How it works
For each query, the planner estimates how many entries each possible index will read and chooses the cheapest plan. Every index is global: its entries are sorted in the same key space as the documents, so a query by index reads only the ranges of the interval it asks for.
What it means for your application
Create indexes for the filters and sorts of your frequent queries; a compound index serves the queries that use its first fields. The planner may choose another index than MongoDB for the same query: explain and the order without sort change, never the returned documents.
Limits
Every index is written on every insert and on every update of the fields it indexes. Plan cache index filters do not exist.