|
Queries with a projection issued using the find command will display the projection in the slow query log:
2015-10-21T12:13:12.756-0400 I COMMAND [conn1] command test.foo command: find { find: "foo", filter: { a: 1.0 }, projection: { _id: 0.0, b: 1.0 } } planSummary: COLLSCAN keysExamined:0 docsExamined:2 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:1 reslen:118 locks:{ Global: { acquireCount: { r: 2 } }, Database: { acquireCount: { r: 1 } }, Collection: { acquireCount: { r: 1 } } } protocol:op_command 0ms
|
Note that the log lists all find command parameters, including one called projection. This logging is only present with a version 3.2 server where the query is issued using an updated-for-3.2 driver. The work was done as part of SERVER-15176, so I am resolving as a duplicate.
|