<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:18:07 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-8692] Add logging to indicate when cached query plan changes</title>
                <link>https://jira.mongodb.org/browse/SERVER-8692</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;This information can be useful to detect when a query plan is oscillating between a good and a bad plan.&lt;/p&gt;

&lt;p&gt;Things exit the cache for:&lt;br/&gt;
1. safety reasons (index add/drop)&lt;br/&gt;
2. no more space in cache&lt;br/&gt;
3. performance degrades&lt;br/&gt;
4. writes (changes data distribution)&lt;br/&gt;
5. explicit commands to mutate cache&lt;/p&gt;

&lt;p&gt;Let&apos;s log when this happens w/level...1.&lt;/p&gt;

&lt;p&gt;The query optimizer currently generates a query plan which is cached and re-used based on the normalized &quot;shape&quot; of the query predicate and sort criteria.&lt;/p&gt;

&lt;p&gt;It would be useful to be able to identify plans by id (e.g., hash value) for tracking, hinting and logging.&lt;br/&gt;
Tracking&lt;/p&gt;

&lt;p&gt;Store the history when the query plan is changed and what it was changed to in the db&apos;s system.plans collection.&lt;br/&gt;
Diagnostics&lt;br/&gt;
Log every time the plan changes for a given query, e.g., &amp;lt;query_id&amp;gt;: changed &amp;lt;old_plan_id&amp;gt; to &amp;lt;new_plan_id&amp;gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="66239">SERVER-8692</key>
            <summary>Add logging to indicate when cached query plan changes</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="benety.goh@mongodb.com">Benety Goh</assignee>
                                    <reporter username="dan@mongodb.com">Daniel Pasette</reporter>
                        <labels>
                            <label>query_triage</label>
                    </labels>
                <created>Sun, 24 Feb 2013 05:37:56 +0000</created>
                <updated>Mon, 11 Jul 2016 17:56:12 +0000</updated>
                            <resolved>Fri, 24 Jan 2014 15:24:46 +0000</resolved>
                                                    <fixVersion>2.5.5</fixVersion>
                                    <component>Querying</component>
                                        <votes>4</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="488700" author="xgen-internal-githook" created="Tue, 28 Jan 2014 13:58:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;benety&apos;, u&apos;name&apos;: u&apos;Benety Goh&apos;, u&apos;email&apos;: u&apos;benety@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8692&quot; title=&quot;Add logging to indicate when cached query plan changes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8692&quot;&gt;&lt;del&gt;SERVER-8692&lt;/del&gt;&lt;/a&gt; additional test cases for queries against null to document existing behavior.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/692155f68924f19cbaae2892e56aa5edbf62fca2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/692155f68924f19cbaae2892e56aa5edbf62fca2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="481285" author="dan@10gen.com" created="Mon, 13 Jan 2014 21:40:16 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=christopher.price%40mtvn.com&quot; class=&quot;user-hover&quot; rel=&quot;christopher.price@mtvn.com&quot;&gt;christopher.price@mtvn.com&lt;/a&gt;, just saw your comment from september.  I believe the feature you&apos;re looking for is reflected in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3443&quot; title=&quot;alter profiler to capture plan used when query ran&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3443&quot;&gt;&lt;del&gt;SERVER-3443&lt;/del&gt;&lt;/a&gt;, scheduled for 2.5.5.&lt;/p&gt;</comment>
                            <comment id="419069" author="christopher.price@mtvn.com" created="Fri, 6 Sep 2013 02:27:01 +0000"  >&lt;p&gt;Maybe this should be a separate ticket, but how difficult would it be to add the index that was used on the query in the  &quot;slow query&quot; log?&lt;/p&gt;</comment>
                            <comment id="368384" author="christopher.price@mtvn.com" created="Wed, 26 Jun 2013 18:45:08 +0000"  >&lt;p&gt;Based on previous discussion: looking forward to seeing the index that is used when&lt;br/&gt;
a) a query plan is used for the first time and&lt;br/&gt;
b) the index that is used on a query plan changes.&lt;/p&gt;

&lt;p&gt;The benefits of this is that we can then report/review when query plans oscillate between 2 or more indexes and also get a concrete idea of which indexes are actually used (or not used) in our databases.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="106024">SERVER-12358</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="69985">SERVER-9152</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="67516">SERVER-8871</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11364">SERVER-666</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>4.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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 26 Jun 2013 18:45:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 3 weeks, 1 day ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/CS-6081'>CS-6081</a></s>]]></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_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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 3 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>benety.goh@mongodb.com</customfieldvalue>
            <customfieldvalue>christopher.price@mtvn.com</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrn4zb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5706</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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|hszxvj:</customfieldvalue>

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