<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:03:04 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-23332] Expose query plan cache key in system.profile entry and query log lines</title>
                <link>https://jira.mongodb.org/browse/SERVER-23332</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It would be nice if we included a hash of all queries (without their binds) so we can get a sense for unique types of queries being run on a system and to be able to get a better performance profile for &quot;bad&quot; queries.  If we could add that hash into the mongod.log we can easily &quot;group&quot; queries for prioritization when telling the customer what to &quot;tweak&quot;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="274826">SERVER-23332</key>
            <summary>Expose query plan cache key in system.profile entry and query log lines</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="haley.connelly@mongodb.com">Haley Connelly</assignee>
                                    <reporter username="shakir.sadikali@mongodb.com">Shakir Sadikali</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Mar 2016 14:35:02 +0000</created>
                <updated>Mon, 13 Aug 2018 17:25:35 +0000</updated>
                            <resolved>Tue, 31 Jul 2018 22:40:08 +0000</resolved>
                                                    <fixVersion>4.1.2</fixVersion>
                                    <component>Logging</component>
                    <component>Querying</component>
                                        <votes>3</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="1962237" author="xgen-internal-githook" created="Tue, 31 Jul 2018 22:37:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Haley Connelly&apos;, &apos;email&apos;: &apos;haley.connelly@10gen.com&apos;, &apos;username&apos;: &apos;haleyConnelly&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23332&quot; title=&quot;Expose query plan cache key in system.profile entry and query log lines&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23332&quot;&gt;&lt;del&gt;SERVER-23332&lt;/del&gt;&lt;/a&gt; Expose query plan cache key in system.profile entry and query log lines&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/075d7fe467e12aa3dfa19aff27672a7a5b34aff0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/075d7fe467e12aa3dfa19aff27672a7a5b34aff0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1915158" author="ian@10gen.com" created="Fri, 8 Jun 2018 14:38:48 +0000"  >&lt;p&gt;Just a note that this should be expanded to include the plan cache introspection commands.&lt;/p&gt;</comment>
                            <comment id="1658313" author="david.storch" created="Mon, 28 Aug 2017 13:15:55 +0000"  >&lt;p&gt;Copying in some more context from &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.arhelger&quot; class=&quot;user-hover&quot; rel=&quot;kevin.arhelger&quot;&gt;kevin.arhelger&lt;/a&gt; in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30859&quot; title=&quot;Hash query shapes when logging&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30859&quot;&gt;&lt;del&gt;SERVER-30859&lt;/del&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
	&lt;li&gt;Especially long queries are truncated in the mongod log file.&lt;/li&gt;
	&lt;li&gt;Parsing the shape of queries from a log line is difficult.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I propose two improvements.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;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.&lt;/li&gt;
	&lt;li&gt;Add an administrative command to return a query shape from a hash in the plan cache.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;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.&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="1215231" author="david.storch" created="Fri, 25 Mar 2016 14:27:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shakir.sadikali&quot; class=&quot;user-hover&quot; rel=&quot;shakir.sadikali&quot;&gt;shakir.sadikali&lt;/a&gt; thanks for elaborating. I do believe that if we map this request from Oracle terminology to MongoDB terminology, the idea is to expose the plan cache key in system.profiler (and probably also in the logs). I am going to update the summary of the ticket accordingly, as this will allow the query team developers to more quickly understand the feature request. Please let me know if you think my interpretation is not accurate.&lt;/p&gt;</comment>
                            <comment id="1214975" author="shakir.sadikali" created="Thu, 24 Mar 2016 22:50:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch&quot; class=&quot;user-hover&quot; rel=&quot;david.storch&quot;&gt;david.storch&lt;/a&gt; Perhaps we&apos;re using different terminology.  Ideally, I would parse out all the bind variables and then create a &quot;hash key&quot; of the query text and use that as a unique identifier to any unique parsed query.  I would then be able to use that to perform reporting (i.e. how often is a query executing, what&apos;s it&apos;s plan, number of I/O aggregate and per exec, time on CPU...etc.  This would be analogous to v$sql_area, v$sql_plan, etc. in Oracle.  I consider system.profile analogous to v$active_session_history.&lt;/p&gt;</comment>
                            <comment id="1214001" author="david.storch" created="Thu, 24 Mar 2016 16:39:16 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shakir.sadikali&quot; class=&quot;user-hover&quot; rel=&quot;shakir.sadikali&quot;&gt;shakir.sadikali&lt;/a&gt;, I&apos;m not sure I understand this request. Are you suggesting that we add the internal plan cache key to the query log line? The plan cache key is a sequence of bytes, generated from the parsed query, which we use internally as our concept of &quot;query shape&quot;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                        <issuelink>
            <issuekey id="587613">DOCS-11965</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="526412">SERVER-34455</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="420797">SERVER-30859</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="526412">SERVER-34455</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000ZebuCIAR, 500A000000bUtrxIAC]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 24 Mar 2016 14:41:31 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 28 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1102</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 28 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>haley.connelly@mongodb.com</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>shakir.sadikali@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkckf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8qgf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="2404">Query 2018-07-16</customfieldvalue>
    <customfieldvalue id="2405">Query 2018-07-30</customfieldvalue>
    <customfieldvalue id="2440">Query 2018-08-13</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hs9yfj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>