<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:00:32 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-64518] Last point TS Opt M3: Rewrite only when index is available</title>
                <link>https://jira.mongodb.org/browse/SERVER-64518</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alya.berciu&quot; class=&quot;user-hover&quot; rel=&quot;alya.berciu&quot;&gt;alya.berciu&lt;/a&gt;&#160;saw a 60% performance drop on some last point queries when we do a rewrite but the proper index is not available.&#160; We should look into whether we can avoid this rewrite when we know it will be harmful.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2002000">SERVER-64518</key>
            <summary>Last point TS Opt M3: Rewrite only when index is available</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="alya.berciu@mongodb.com">Alya Berciu</assignee>
                                    <reporter username="steve.tarzia@mongodb.com">Steve Tarzia</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Mar 2022 16:11:19 +0000</created>
                <updated>Wed, 6 Apr 2022 13:39:58 +0000</updated>
                            <resolved>Tue, 5 Apr 2022 16:54:58 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4458664" author="charlie.swanson" created="Tue, 5 Apr 2022 17:52:16 +0000"  >&lt;p&gt;Thanks for the writeup &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alya.berciu&quot; class=&quot;user-hover&quot; rel=&quot;alya.berciu&quot;&gt;alya.berciu&lt;/a&gt;. I think this is another good demonstration of how we want to have an optimizer that understands the entire query, and another ticket to consider using as a proof point of the new optimizer once we get to the phase where we can understand both $group queries and time-series collections. cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=steve.la&quot; class=&quot;user-hover&quot; rel=&quot;steve.la&quot;&gt;steve.la&lt;/a&gt;&#160;and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=svilen.mihaylov&quot; class=&quot;user-hover&quot; rel=&quot;svilen.mihaylov&quot;&gt;svilen.mihaylov&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4458438" author="alya.berciu" created="Tue, 5 Apr 2022 16:54:58 +0000"  >&lt;p&gt;After discussing with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=steve.tarzia&quot; class=&quot;user-hover&quot; rel=&quot;steve.tarzia&quot;&gt;steve.tarzia&lt;/a&gt;, we decided not to go forward with this. Bypassing the rewrite would improve some cases (where the $match selectivity is 90%, the rewrite is ~60% worse) at the expense of other cases (where the $match selectivity is 10%, the rewrite is 85% better).&lt;/p&gt;

&lt;p&gt;We do not currently have a way to differentiate the two queries in code and pick an appropriate plan for each case, so we have to pick one case to prioritize. We will go with the case where we have a smaller selectivity.&lt;/p&gt;

&lt;p&gt;Here is a link to the relevant patch where I tested the effect of using a smaller selectivity in the query: &lt;a href=&quot;https://spruce.mongodb.com/version/6246c4b0850e614ad49c68bf/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://spruce.mongodb.com/version/6246c4b0850e614ad49c68bf/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the feature flag is on we do significantly better than when the feature flag is off.&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Query&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Average Latency (FF off)&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Average Latency (FF on)&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;% Difference&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;{time: 1, meta: 1}&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&#160;6646829472.5&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&#160;1003973422.8&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&#160;-85%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;{time: 1, meta: -1}&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&#160;6632846559&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&#160;1004721137.6&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&#160;-85%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;I also created a separate ticket to update the Genny workload to test both cases: PERF-2919&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 5 Apr 2022 16:54:58 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 44 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-2330</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>svilen.mihaylov@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 44 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>135.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alya.berciu@mongodb.com</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>steve.tarzia@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0nbrr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i06cu4:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </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|i0mxx3:</customfieldvalue>

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