Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Problem: It's easy to run into performance problems with queries that are not backed by an index or miss the right one. Developers writing these queries typically do not have the real large production data, and thus don't see that a query would scale badly, and would not see any traversal warnings, as these only happen with a large number of results.
Proposal: Oak's query engine already calculates a cost estimate to make a decision which index to use, or even if there is any at all. This cost estimate could be used to find out if a query is not supported by an index or with one that is not suitable enough (e.g. ordering by property that is not indexed)
If a query is above a certain cost value, a big warning could be put out or even the query could be made to fail (maybe a per query option, that you might want to have to "fail" by default to ensure people are not overlooking the problem). The cost limit should be configurable, as it might depend on the hardware power.
Attachments
Issue Links
- duplicates
-
OAK-2550 Hint for Query Engine that Traversal is OK
- Resolved
- relates to
-
OAK-5018 Warn traversal queries: false positives
- Closed
-
OAK-937 Query engine index selection tweaks: shortcut and hint
- Closed
-
OAK-5145 Warn traversal queries: avoid repeated log entries
- Closed
-
OAK-5237 Change default query limit configuration
- Closed
-
OAK-6142 Warn or fail queries above a configurable cost value: use log level "warning"
- Closed
- supercedes
-
OAK-4874 Improve the warning logged when traversal happens within property index
- Resolved