Details
-
Improvement
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
2.2.7, 2.4.9, 2.6.0-rc1
-
None
-
None
-
Query Execution
Description
There are several schemas for how queries with/without sort are stored in system.profile. This makes it unnecessarily complex to run aggregation over system.profile collections that access the query patterns.
There should be a single common format for all queries.
simple find, no sort : query on top level
db.docs.find({a: 1})
|
|
"query" : {
|
"a" : 1
|
},
|
find with sort, query is nested in another query field, without $.
db.docs.find({a: 1}).sort({b:1})
|
|
"query" : {
|
"query" : {
|
"a" : 1
|
},
|
"orderby" : {
|
"b" : 1
|
}
|
},
|
$query / $orderby syntax, results in nested $query field with $.
db.docs.find({ $query: {a: 1}, $orderby: {b: 1} })
|
|
"query" : {
|
"$query" : {
|
"a" : 1
|
},
|
"$orderby" : {
|
"b" : 1
|
}
|
},
|
Attachments
Issue Links
- related to
-
SERVER-6768 MongoDB Profiler creates illegal documents
-
- Closed
-