[DOCS-4015] Document performance impacts of $min without $max (and vice-versa) Created: 10/Sep/14  Updated: 16/Mar/15  Resolved: 24/Sep/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.11

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Andrew Aldridge
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-15168 Allow intersection of $min/$max bound... Closed
is related to SERVER-17580 Warn when using only one of $min or $... Open
Participants:
Days since reply: 8 years, 48 weeks, 5 days ago

 Description   

When the $min query specifier is used without a corresponding $max, the upper index bound is the end of the index. This means that a query which uses $min but not $max may potentially scan from the lower bound all the way to the end of the index. This may be a considerable performance impact, compared to an equivalent query which lacks $min. This behaviour, and the corresponding recommendation to always use $min and $max together, should be noted on the following pages:

Similarly when $max is used without $min - the lower bound is the start of the index, and the query may scan from the start of the index up to the upper bound. This again may be much less performant than an equivalent query without $max. This behaviour, and the corresponding recommendation to always use $min and $max together, should be noted on the following pages:



 Comments   
Comment by Githook User [ 13/Mar/15 ]

Author:

{u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kev@pulo.com.au'}

Message: Visually highlight the warning about using $min xor $max

Following up from DOCS-4015, the second paragraph in the "$min without $max" and "$max within $min" sections should be more noticable, since it is warning the user of hazardous usage that is best avoided.
Branch: master
https://github.com/mongodb/docs/commit/b1b2e54826b3d41fb1ac76d2c0f407c73eb1ba89

Comment by Githook User [ 24/Sep/14 ]

Author:

{u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}

Message: DOCS-4015: Document performance impact of min without max, vice-versa

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/d8b3c6f5ab889338455e43c38254c79f0363ec75

Generated at Thu Feb 08 07:47:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.