[SERVER-12965] $geoIntersects is very slow compared to 2.4 Created: 28/Feb/14 Updated: 10/Dec/14 Resolved: 05/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavel Baranov | Assignee: | Amalia Hawkins |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
Here are the indexes:
Mongo 2.4 explain
Mongo 2.6 explain:
2 second difference. |
| Comments |
| Comment by Pavel Baranov [ 05/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Awesome. Thank you! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Amalia Hawkins [ 05/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actually, after further investigation, I believe the commit responsible for fixing this may be a3d910925350d2f0204b41ea145e24f74e5c39ce. Let us know if you see anything else! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Amalia Hawkins [ 05/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ahh, I see now, my mistake. I will keep an eye on this in the next release candidate in case of regression. Thank you for the heads up. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Baranov [ 04/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I see, but was more referring to: "cursor" : "BtreeCursor coords_2dsphere", VS. "cursor" : "BtreeCursor coords_2dsphere", It's the same dataset, same index, just 2.6.0-rc0 vs nightly. quite a difference in numbers and everything executes faster - just saying Thanks! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Amalia Hawkins [ 04/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, it does – good catch. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Baranov [ 04/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Btw, this is the explain from the following version: mongodb-linux-x86_64-914a26f51ff7ffeb28922273925318da6a6eba71-2014-02-28
Looks different from 2.6.0-rc0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Amalia Hawkins [ 04/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I was unable to confirm any loss of performance in $geoIntersects between 2.4.9 and the current 2.6.0-rc0. I've attached the basic script I used for testing in case anyone wants to perform further investigation. Closing this ticket for now. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 01/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report Pavel. One-off tests using explain are often not a very reliable query latency experiment. The results are impacted by whether working set is in memory and time spent in query planning. We'll do some additional testing to make sure. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Baranov [ 01/Mar/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Just tried the latest version ( mongodb-linux-x86_64-914a26f51ff7ffeb28922273925318da6a6eba71-2014-02-28 )
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Pavel Baranov [ 28/Feb/14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actually 4 seconds (4118) in this particular one, my other tests were 2 seconds. |