-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.4
-
Component/s: Performance, Querying
-
None
-
Query Execution
In some cases when expensive operations compete for resources (collection scan, ineffective index usage, etc), some queries may yield much more than others, producing slower results for those queries (which could have been avoided if yields had been distributed fairly among active operations).
In one example, 41 reads competed with 1 write. The number of yields for the reads in-flight waiting for the write to complete were 16, 0, 0, 0, 0, 116, 19, 10, 0, 31, 23, 28, 1, 24, 13, 52, 10, 0, 94, 10, 11, 0, 23, 1, 26, 54, 24, 0, 22, 48, 19, 23, 28, 536, 3, 24, 0, 0, 27, 9. The query with 536 yields was no more complex than the others.
This behavior can be especially noticeable, and produce cascades of timeouts or connections, when a socket/read timeout are set by the client. A better option than setting a client timeout is to support this on the server like with SERVER-2212, or the current $maxScan option.
- related to
-
SERVER-2212 Server automatically abort queries/commands after user-specified time limit
- Closed