[SERVER-30859] Hash query shapes when logging Created: 27/Aug/17  Updated: 06/Dec/22  Resolved: 28/Aug/17

Status: Closed
Project: Core Server
Component/s: Logging, Querying
Affects Version/s: 3.4.7, 3.5.12
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kevin Arhelger Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23332 Expose query plan cache key in system... Closed
Assigned Teams:
Query
Participants:

 Description   

1. Especially long queries are truncated in the mongod log file.
2. Parsing the shape of queries from a log line is difficult.

I propose two improvements.

1. Always print a hash of the query shape. This eliminates the issue of #1 as we can now group queries by hash. This also will speed log analysis, eliminating the need to parse the query.
2. Add an administrative command to return a query shape from a hash in the plan cache.

Not only would this speed analysis of slow queries but would be helpful with log redaction. The analysis can be performed on just the hash with the associated metadata and the customer can investigate the actual queries independently.



 Comments   
Comment by David Storch [ 28/Aug/17 ]

kevin.arhelger, this looks like it is effectively a duplicate of SERVER-23332, so I'm closing it as such. I'm going to copy your description into the older ticket, since I think it provides a lot of context on how this would be useful for slow query analysis.

Generated at Thu Feb 08 04:25:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.