1.8 KiB
1.8 KiB
Query And Indexing
Purpose And Business Outcome
Deliver predictable query correctness and performance using expression translation with index-aware execution.
Scope And Non-Goals
Scope:
- LINQ query translation
- Primary and secondary index usage
- Scan fallback where index optimization is not applicable
Non-goals:
- Full SQL compatibility
- Distributed query federation
User And System Workflows
- Consumer submits LINQ expression.
- Query planner evaluates index opportunities.
- Engine executes index-backed or scan path.
- Results are materialized to consumer entities.
Interfaces And APIs
AsQueryable()and query provider componentsCollectionIndexManager- Index implementations under
src/CBDD.Core/Indexing
Permissions And Data Handling
- Query access follows host application authorization policy.
- Indexed data inherits the same sensitivity classification as source payloads.
Dependencies And Failure Modes
Dependencies:
- Valid index metadata and storage consistency
- Expression visitor correctness
Failure modes:
- Incorrect predicate translation
- Missing/ineffective indexes
- Performance regressions due to scan-heavy paths
Monitoring, Alerts, And Troubleshooting
- Track query-related regressions in automated tests.
- Use
../runbook.mdfor incident handling. - Follow
../security.mdfor sensitive data and access constraints. - Use
../troubleshooting.mdfor remediation.
Rollout And Change Considerations
- Query planner/index behavior changes require benchmark comparison and regression coverage.
- Document breaking semantics in release notes.
Validation Guidance
- Run query, index, and optimizer test suites in
tests/CBDD.Tests. - Confirm coverage gate with
bash scripts/coverage-check.sh.