...
- For a query that will return 1 out of N items, the current time complexity is linear, O(N).
- For a query that will return all N items, the current time complexity is quadratic, O(N2).
Objective of the proposed solution
The objective is to achieve the maximum theoretical performance for queries.
- For a query that will return 1 out of N items, the best theoretical time complexity is constant, O(1).
- For a query that will return all N items, the best theoretical time complexity is linear, O(N).
...