[SERVER-17580] Warn when using only one of $min or $max index bounds Created: 13/Mar/15  Updated: 06/Dec/22

Status: Open
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: features we're not sure of

Type: Improvement Priority: Minor - P4
Reporter: Kevin Pulo Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: diagnostics
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-4015 Document performance impacts of $min ... Closed
related to SERVER-15168 Allow intersection of $min/$max bound... Closed
is related to SERVER-40873 Poor performance on certain configura... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

In the absence of a fix for SERVER-15168 (now tracked as SERVER-8045), it would be useful to output a warning when a query is issued which uses $min but not $max, or vice-versa. This is because such usage can often have deleterious performance, and is contrary to the intended usage of $min/$max (see DOCS-4015).

Since the main in-server usage of $min/$max is for sharding, and always specifies both $min and $max, the warning would only occur with user queries that only specify either $min or $max (but not both).


Generated at Thu Feb 08 03:44:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.