[SERVER-9521] query slow when searching for 2 identical sub documents Created: 30/Apr/13  Updated: 10/Dec/14  Resolved: 17/Jun/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.3
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: wolf Assignee: David Hows
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

win 64


Operating System: Windows
Participants:

 Description   

got query of type.
this query runs without outputing a message if primaryWord not equal secondaryWord (the first "B" not same as second "B").
there's 1000's of combinations in the DB, and only those with both sub documents the same will throw the message/ run slow.
my workaround: i dont query for these combinations anymore.

Wed May 01 06:48:28.435 [conn348] query bauhaus.MDocument query: { $and: [

{ _is Deleted: false }

,

{ _basedOn: "$system.SearchPhraseCombination" }

, { _attributes
: { $elemMatch:

{ _basedOn: "$system.PrimaryWord", _isDeleted: false, _valueText : "B" }

} }, { _attributes: { $elemMatch:

{ _basedOn: "$system.SecondaryWord", _ isDeleted: false, _valueText: "B" }

} } ] } ntoreturn:0 ntoskip:0 nscanned:28007
keyUpdates:0 locks(micros) r:165221 nreturned:0 reslen:20 165ms



 Comments   
Comment by David Hows [ 28/May/13 ]

Hi Wolf,

Can you explain a little more clearly what the issue you are seeing is?

It sounds like you are only seeing this query in your logs when its running slow, which is expected as MongoDB will only print queries running over the SlowMS value (default 100ms).

Can you elaborate a bit, and provide explain output for both the good and bad queries?

Thanks,
David

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