[SERVER-62760] Add information to query log line indicating when the new optimizer is used Created: 19/Jan/22  Updated: 29/Oct/23  Resolved: 19/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.3, 6.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Ben Shteinfeld
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by COMPASS-6038 Investigate changes in SERVER-62760: ... Closed
is depended on by TOOLS-3180 Investigate changes in SERVER-62760: ... Closed
Documented
is documented by DOCS-15553 Investigate changes in SERVER-62760: ... Closed
Related
related to SERVER-60848 Log which engine was used for process... Closed
is related to SERVER-71172 Expose hybrid plans in profiler, slow... Closed
Backwards Compatibility: Minor Change
Backport Requested:
v6.0
Sprint: QO 2022-07-11, QO 2022-07-25, QO 2022-08-08, QO 2022-08-22
Participants:

 Comments   
Comment by Githook User [ 19/Oct/22 ]

Author:

{'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}

Message: SERVER-62760 Implement CQF Query Logging
Branch: v6.0
https://github.com/mongodb/mongo/commit/aa45daf78e0e0f077b0976d43674976c4d893f34

Comment by Hana Pearlman [ 25/Aug/22 ]

Detailed before and after

Change Before After
Slow query log “msg”:“Slow query”,“attr”:{ ..., “planCacheKey”:“84A11A7D”,“queryExecutionEngine”:“sbe|classic”,“reslen”:166,“, ... “msg”:“Slow query”,“attr”:{ ..., “planCacheKey”:“84A11A7D”,“queryFramework”:“sbe|classic|cqf”,“reslen”:166,“, ...
Server Status counters db.serverStatus().metrics.query
{
     "planCacheTotalSizeEstimateBytes" : NumberLong(0),
     "queryExecutionEngine" : {
            "find": {
                   sbe: 3
                   classic: 2
            }
            "aggregate": {
                   sbeOnly: 7
                   classicOnly: 7
                   sbeHybrid: 4
                   classicHybrid: 4
            }
     },
     "updateOneOpStyleBroadcastWithExactIDCount" : NumberLong(0)
}
db.serverStatus().metrics.query
{
     "planCacheTotalSizeEstimateBytes" : NumberLong(0),
     "queryFramework" : {
            "find": {
                   sbe: 3
                   classic: 2
                   cqf: 2
            }
            "aggregate": {
                   sbeOnly: 7
                   classicOnly: 7
                   sbeHybrid: 4
                   classicHybrid: 4
                   cqf: 2
            }
     },
     "updateOneOpStyleBroadcastWithExactIDCount" : NumberLong(0)
}
Comment by Githook User [ 17/Aug/22 ]

Author:

{'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}

Message: SERVER-62760 Implement CQF Query Logging
Branch: master
https://github.com/mongodb/mongo/commit/43f9a78849f884bd01608ee5129eb7ac6df16b4f

Comment by Kyle Suarez [ 19/Jan/22 ]

I'm linking as related SERVER-60848, which is adding diagnostic info on which execution engine is being used for a query.

Generated at Thu Feb 08 05:55:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.