[SERVER-3277] More specific explain() for geo queries Created: 16/Jun/11  Updated: 12/Jul/16  Resolved: 22/Nov/11

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 1.8.1
Fix Version/s: 2.1.0

Type: Bug Priority: Major - P3
Reporter: Kyle Banker Assignee: Greg Studer
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-1429 explain() on geo queries reports inco... Closed
Related
related to SERVER-3653 Issues with multiple spatial indexes Closed
Operating System: ALL
Participants:

 Description   

Suppose you have two compound geo indexes defined on the same collection. For instance:

{loc: '2d', day: 1} {loc: '2d', year: 1}

Currently, the explain() output for queries that should use these indexes is deficient the following ways:

1. The exact index being used isn't noted. All we get is the cursor type: GeoSearchCursor.

2. The index bound aren't provided for either field. This makes it impossible to know whether the compound index is even worth maintaining.

For instance:

"cursor" : "GeoSearchCursor",
"nscanned" : 1,
"nscannedObjects" : 1,
"n" : 1,
"millis" : 0,
"nYields" : 0,
"nChunkSkips" : 0,
"isMultiKey" : false,
"indexOnly" : false,
"indexBounds" : {}



 Comments   
Comment by Greg Studer [ 22/Nov/11 ]

Resolving as fixed as in 2.1, explain() bounds are much more informative (spatial regions searched are given). Multi-geo-index per collection is tracked in SERVER-3653

Comment by auto [ 27/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: change name of extra explain function for cursor - SERVER-3277
Branch: master
https://github.com/mongodb/mongo/commit/a0f84c7f22fc8d23dcfeb572cd0a1840fae841d8

Comment by auto [ 27/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: output the regions searched in explain for 2d searches - SERVER-3277
Branch: master
https://github.com/mongodb/mongo/commit/4af8e70402b6b73f98178cc74e485f291a63475a

Comment by auto [ 27/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: allow custom explain extensions SERVER-3277
Branch: master
https://github.com/mongodb/mongo/commit/1a1233fd6711985956712e93b09ac72d23e15af6

Comment by auto [ 27/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: tracking for fixes for SERVER-3277
Branch: master
https://github.com/mongodb/mongo/commit/9f635c77d59bacad2941fd8559fcefdb31af1a99

Comment by Greg Studer [ 17/Jun/11 ]

This is technically not supported, since only one index per db is currently supported. Agree that this is an enhancement worth doing though - it's a pain point.

The additional index information is only annotated, the benefit is not in restricting the query space but speeding up the filtering of results by placing the data in the index key. We'll have to change the query algorithm to do something like haystack in order to take further advantage of it.

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