Lesson 18← back to roadmap
explain() is your single best window into runtime behavior.
cpp
auto plan = collection.explain_query(query, /*k=*/10, filter);
// plan.strategy — QueryStrategy enum
// plan.candidate_count — narrowed candidate set size
// plan.metadata_accelerated
// plan.gpu_index
// plan.index_type_name- Selective filter + accelerated metadata → candidate_count drops by orders of magnitude
- GPU built in → gpu_index = true; the dispatch goes through GpuBackend
- No accelerator, flat index → planner picks brute-force; expect linear-in-N latency
Treat strategy + candidate_count as the two telemetry numbers you actually emit per query.