<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:42:58 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-36393] Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded</title>
                <link>https://jira.mongodb.org/browse/SERVER-36393</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;For version 3.6,&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-13732&quot; title=&quot;Predicates in top-level implicit AND query not considered when generating index access plan for contained OR&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-13732&quot;&gt;&lt;del&gt;SERVER-13732&lt;/del&gt;&lt;/a&gt; added an optimization for contained &lt;tt&gt;$or&lt;/tt&gt; queries&#160;which causes the query planner to generate more efficient plans. This optimization can also cause additional indexed &lt;tt&gt;$or&lt;/tt&gt; plans to be considered in 3.6 which were not considered in older versions of the MongoDB server. As an example, consider the query&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;find({a: 1, $or: [{b: 2, c: 2}, {b: 3, c: 3}]})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Suppose that the collection has indices {a: 1, c: 1} and {b: 1, c: 1}. Prior to 3.6, the query planner would generate two plans:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;An IXSCAN on {a: 1, c: 1} with bounds {a: [[1, 1]], c: [[&quot;MinKey&quot;, &quot;MaxKey&quot;]]}&lt;/li&gt;
	&lt;li&gt;An OR plan with two IXSCANS on {b: 1, c: 1}.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;With contained &lt;tt&gt;$or&lt;/tt&gt; pushdown, the predicate &quot;a:1&quot; can be pushed into both branches of the &lt;tt&gt;$or&lt;/tt&gt;. This allows the planner to additionally consider an OR plan with two IXSCANS on {a: 1, c: 1}, one with bounds {a: [[1, 1]], c: [[2, 2]]} and the other with bounds {a: [[1, 1]], c: [[3, 3]]}.&lt;/p&gt;

&lt;p&gt;Typically, generating these extra plans has the benefit of allowing queries to be answered with tighter index bounds. However, in order to manage the potential combinatorial explosion of indexed OR plans, the planner imposes a limit on the number of plans generated for a particular &lt;tt&gt;$or&lt;/tt&gt; node in the input query. This limit is configurable at startup and at runtime via the setParameter &lt;tt&gt;internalQueryEnumerationMaxOrSolutions&lt;/tt&gt;, which has a default value of 10. The additional plans considered due to &lt;tt&gt;$or&lt;/tt&gt; pushdown can cause the total number of plans to exceed &lt;tt&gt;internalQueryEnumerationMaxOrSolutions&lt;/tt&gt;. This can inhibit generation of the best plan, thus causing a query to select a suboptimal indexed &lt;tt&gt;$or&lt;/tt&gt; plan.&lt;/p&gt;</description>
                <environment></environment>
        <key id="580891">SERVER-36393</key>
            <summary>Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="david.storch@mongodb.com">David Storch</reporter>
                        <labels>
                            <label>qopt-team</label>
                            <label>query-44-grooming</label>
                            <label>storch</label>
                    </labels>
                <created>Wed, 1 Aug 2018 17:10:16 +0000</created>
                <updated>Wed, 17 May 2023 05:43:50 +0000</updated>
                                            <version>3.6.6</version>
                    <version>4.0.0</version>
                                                    <component>Querying</component>
                                        <votes>5</votes>
                                    <watches>39</watches>
                                                                                                                <comments>
                            <comment id="3473636" author="xgen-internal-githook" created="Tue, 3 Nov 2020 14:45:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Charlie Swanson&apos;, &apos;email&apos;: &apos;charlie.swanson@mongodb.com&apos;, &apos;username&apos;: &apos;cswanson310&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36393&quot; title=&quot;Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36393&quot;&gt;SERVER-36393&lt;/a&gt; Add new opt-in $or enumeration order&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit f95fe9a05da63905e7e8699f61d4a0b2ad67074b.&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d8a6a927105e9b898d85a5db16ef97f3b24d8c40&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d8a6a927105e9b898d85a5db16ef97f3b24d8c40&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3418691" author="xgen-internal-githook" created="Wed, 30 Sep 2020 15:17:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Charlie Swanson&apos;, &apos;email&apos;: &apos;charlie.swanson@mongodb.com&apos;, &apos;username&apos;: &apos;cswanson310&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36393&quot; title=&quot;Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36393&quot;&gt;SERVER-36393&lt;/a&gt; Add new opt-in $or enumeration order&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 03fb28b42c1b9e36c6ebd5c6aa4b8afc29dde099)&lt;br/&gt;
(cherry picked from commit bffdd28e183d5b720c897b56278821e65762ccd7)&lt;br/&gt;
(cherry picked from commit e81be8db078eb541495dee9a47433b92f5140e18)&lt;br/&gt;
(cherry picked from commit a7c50d464f9582cb6e255a7818354b5e41eea9e2)&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/f95fe9a05da63905e7e8699f61d4a0b2ad67074b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/f95fe9a05da63905e7e8699f61d4a0b2ad67074b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3418631" author="xgen-internal-githook" created="Wed, 30 Sep 2020 14:57:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Charlie Swanson&apos;, &apos;email&apos;: &apos;charlie.swanson@mongodb.com&apos;, &apos;username&apos;: &apos;cswanson310&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36393&quot; title=&quot;Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36393&quot;&gt;SERVER-36393&lt;/a&gt; Add new opt-in $or enumeration order&lt;/p&gt;

&lt;p&gt;(cherry picked from commit 03fb28b42c1b9e36c6ebd5c6aa4b8afc29dde099)&lt;br/&gt;
(cherry picked from commit bffdd28e183d5b720c897b56278821e65762ccd7)&lt;br/&gt;
(cherry picked from commit e81be8db078eb541495dee9a47433b92f5140e18)&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a7c50d464f9582cb6e255a7818354b5e41eea9e2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a7c50d464f9582cb6e255a7818354b5e41eea9e2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3401067" author="xgen-internal-githook" created="Fri, 18 Sep 2020 15:43:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Charlie Swanson&apos;, &apos;email&apos;: &apos;charlie.swanson@mongodb.com&apos;, &apos;username&apos;: &apos;cswanson310&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36393&quot; title=&quot;Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36393&quot;&gt;SERVER-36393&lt;/a&gt; Add new opt-in $or enumeration order&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bffdd28e183d5b720c897b56278821e65762ccd7)&lt;br/&gt;
(cherry picked from commit e81be8db078eb541495dee9a47433b92f5140e18)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/03fb28b42c1b9e36c6ebd5c6aa4b8afc29dde099&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/03fb28b42c1b9e36c6ebd5c6aa4b8afc29dde099&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3389040" author="xgen-internal-githook" created="Fri, 11 Sep 2020 20:39:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Charlie Swanson&apos;, &apos;email&apos;: &apos;charlie.swanson@mongodb.com&apos;, &apos;username&apos;: &apos;cswanson310&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36393&quot; title=&quot;Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36393&quot;&gt;SERVER-36393&lt;/a&gt; Add new opt-in $or enumeration order&lt;/p&gt;

&lt;p&gt;(cherry picked from commit bffdd28e183d5b720c897b56278821e65762ccd7)&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e81be8db078eb541495dee9a47433b92f5140e18&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e81be8db078eb541495dee9a47433b92f5140e18&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3372902" author="xgen-internal-githook" created="Wed, 2 Sep 2020 18:08:06 +0000"  >&lt;p&gt;Accidentally committed under the wrong ticket. The following commit is related, but this issue remains unresolved:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Author:&lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {&amp;#39;name&amp;#39;}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-36393&quot; title=&quot;Contained $or pushdown optimization can cause internalQueryEnumerationMaxOrSolutions to be exceeded&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-36393&quot;&gt;SERVER-36393&lt;/a&gt; Add new opt-in $or enumeration order&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bffdd28e183d5b720c897b56278821e65762ccd7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/bffdd28e183d5b720c897b56278821e65762ccd7&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="3336947" author="charlie.swanson" created="Thu, 13 Aug 2020 14:18:58 +0000"  >&lt;p&gt;I decided to split out the work into a new ticket: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50291&quot; title=&quot;Add query knob to enumerate $or children in a different order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50291&quot;&gt;&lt;del&gt;SERVER-50291&lt;/del&gt;&lt;/a&gt;. I am attempting to implement the workaround described above (and in the new ticket), but this ticket will remain an issue, even with that workaround. So I&apos;ll leave this open and return it to the backlog, but I am continuing progress on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-50291&quot; title=&quot;Add query knob to enumerate $or children in a different order&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-50291&quot;&gt;&lt;del&gt;SERVER-50291&lt;/del&gt;&lt;/a&gt;. We have an implementation that works, stay tuned for updates over there!&lt;/p&gt;</comment>
                            <comment id="3322295" author="charlie.swanson" created="Wed, 5 Aug 2020 14:15:52 +0000"  >&lt;p&gt;Since it&apos;s been a little while since I started looking into this, I just wanted to post an update here:&lt;/p&gt;

&lt;p&gt;The patch is looking a little rough and messy at this point, but I think it&apos;s possible to implement the workaround described in Dave&apos;s comment. It&apos;ll need some serious polish, review, and testing, but so far it&apos;s pretty nicely contained behind a serverParameter, so the risk to existing workloads is minimal.&lt;/p&gt;

&lt;p&gt;I recently encountered some difficulty around determining whether we&apos;ve reached the end of plan enumeration. The approach so far is to first list the sub-plans in &quot;lockstep iteration order&quot; (or whatever you want to call that) as described above, then once those are exhausted go back to the &quot;normal&quot; or &quot;traditional&quot; iteration order. In this second &quot;phase&quot; you&apos;ll still occasionally encounter one of those &quot;lockstep&quot; plans, and will have to skip it. We run into some trouble when we have to skip one like the above, and it&apos;s also the &lt;em&gt;last&lt;/em&gt; plan to enumerate. The internal code and API doesn&apos;t really allow you to easily detect and communicate this. It&apos;s a tractable problem, but that&apos;s what remains to look into. I&apos;m pausing on this investigation for a little while to get some other small test fixes pushed and reviews done, but I hope to resume within the week.&lt;/p&gt;</comment>
                            <comment id="1972686" author="david.storch" created="Fri, 10 Aug 2018 15:27:15 +0000"  >&lt;p&gt;Asya points out that our plan enumeration code might fall over like this less if it changes its enumeration strategy from something like:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A, A, A&lt;/li&gt;
	&lt;li&gt;A, A, B&lt;/li&gt;
	&lt;li&gt;A, A, C&lt;/li&gt;
	&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To something like&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A, A, A&lt;/li&gt;
	&lt;li&gt;B, B, B&lt;/li&gt;
	&lt;li&gt;C, C, C&lt;/li&gt;
	&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This is a heuristic that might help us to force the plan selection code to consider the best index in more cases, short of a more complete solution.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="630505">SERVER-38021</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1440948">SERVER-50291</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="133270">SERVER-13732</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1332015">SERVER-47826</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>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000bUVDaIAO, 500A000000cEGpZIAW, 500A000000by7lKIAQ, 5002K00000jbjNzQAI, 5002K00000mrziNQAQ, 5002K00000obYl7QAE, 5002K00000pCPrSQAW, 5002K00000s21zqQAA, 5002K00000tUnwpQAC, 5002K00000uGNCiQAO, 5002K00000xmUruQAE, 5002K000010IGbFQAW, 5006R00001qDmoSQAS, 5006R00001pkqifQAA, 5006R00001rcH4pQAE, 5006R00001s6FitQAE]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 7 Dec 2018 21:12:14 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 14 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/TSEXP-1758'>TSEXP-1758</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>conchi.bueno@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 14 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>david.storch@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|hu48an:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2huf:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3611">Query 2020-08-10</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;(function() {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    &quot;use strict&quot;;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    db.c.drop();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    db.c.createIndex({a: 1, c: 1});&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    db.c.createIndex({b: 1, c: 1});&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    db.c.createIndex({c: 1, b: 1});&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    let explain = db.c.find({a: 1, $or: [{b: 1, c: 1}, {b: 2, c: 2}, {b: 3, c: 3}, {b: 4, c: 4}]})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;                      .explain(&quot;allPlansExecution&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    let allPlansExec = explain.executionStats.allPlansExecution;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // The number of candidate plans here is constrained by&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // internalQueryEnumerationMaxOrSolutions=10.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // There are 10 OR plans generated, and one plan which indexes just the &quot;a:1&quot; predicate.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    assert.eq(11, allPlansExec.length);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    assert.commandWorked(&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;        db.adminCommand({setParameter: 1, internalQueryEnumerationMaxOrSolutions: 100}));&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    explain = db.c.find({a: 1, $or: [{b: 1, c: 1}, {b: 2, c: 2}, {b: 3, c: 3}, {b: 4, c: 4}]})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;                  .explain(&quot;allPlansExecution&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    allPlansExec = explain.executionStats.allPlansExecution;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // After increasing internalQueryEnumerationMaxOrSolutions, there are many more possible plans&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // generated. With a real data set, one of the inhibited plans may be the best one!&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    //&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // Note that we still run up against the limit of 64 total plans. The size of the plan space for&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // this query is roughly 3 ^ 4 = 81.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    assert.eq(64, allPlansExec.length);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}());&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</customfieldvalue>

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

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