<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:16:09 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-7959] Potentially unexpected scans with compound indexes when some fields are multikey</title>
                <link>https://jira.mongodb.org/browse/SERVER-7959</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Lets say you are querying for { a:{ $gt:10, $lt:20 } }&lt;/p&gt;

&lt;p&gt;and you have an index on a, b&lt;/p&gt;

&lt;p&gt;If b is multikey, the query optimizer will scan a much wider range of index and it will have to scan the objects to complete query evaluation. This is because the optimizer doesn&apos;t know if all the values of a are scalar; if they are not a document like { _id:2, { a:[ 5, 25 ] } } would match the query.&lt;/p&gt;

&lt;p&gt;This makes the advice that an index on a is not needed if you have an index on a, b incorrect and makes performance optimization confusing.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="59632">SERVER-7959</key>
            <summary>Potentially unexpected scans with compound indexes when some fields are multikey</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="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="3">Duplicate</resolution>
                                        <assignee username="hari.khalsa@10gen.com">hari.khalsa@10gen.com</assignee>
                                    <reporter username="max@10gen.com">Max Schireson</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Dec 2012 09:35:04 +0000</created>
                <updated>Wed, 3 Sep 2014 20:44:24 +0000</updated>
                            <resolved>Tue, 2 Sep 2014 16:02:08 +0000</resolved>
                                    <version>2.2.2</version>
                                                    <component>Querying</component>
                                        <votes>13</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="709305" author="thomasr" created="Tue, 2 Sep 2014 16:02:08 +0000"  >&lt;p&gt;Closing this ticket as duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15086&quot; title=&quot;Allow for efficient range queries over non-array fields in multikey indices&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15086&quot;&gt;&lt;del&gt;SERVER-15086&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Even though this ticket precedes &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15086&quot; title=&quot;Allow for efficient range queries over non-array fields in multikey indices&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15086&quot;&gt;&lt;del&gt;SERVER-15086&lt;/del&gt;&lt;/a&gt;, there is more information and recent discussion on the new ticket. &lt;/p&gt;</comment>
                            <comment id="611356" author="zslayton" created="Fri, 6 Jun 2014 15:33:28 +0000"  >&lt;p&gt;@Max Schireson&lt;/p&gt;

&lt;p&gt;What was the workaround provided? I&apos;ve been wrestling with this issue for months. I&apos;d love to see a fix, even if it&apos;s a temporary solution.&lt;/p&gt;</comment>
                            <comment id="449043" author="benety.goh" created="Wed, 30 Oct 2013 20:21:33 +0000"  >&lt;p&gt;smoke test script to reproduce issue&lt;/p&gt;</comment>
                            <comment id="218345" author="max@10gen.com" created="Tue, 18 Dec 2012 15:52:14 +0000"  >&lt;p&gt;There is a very simple special case that may be worth doing if the bigger fix will take a while: at least we know that _id is scalar even when it is a part of a multi-key compound index. In the specific case that inspired this ticket, that would have solved the problem.&lt;/p&gt;</comment>
                            <comment id="217034" author="max@10gen.com" created="Mon, 17 Dec 2012 09:39:57 +0000"  >&lt;p&gt;Workaround provided, but this issue is at the root of that case.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="155427">SERVER-15086</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="64432">SERVER-8454</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="107537">SERVER-12470</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="17719">SERVER-3173</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="40886">SERVER-6050</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="33230" name="server7959.js" size="991" author="benety.goh@mongodb.com" created="Wed, 30 Oct 2013 20:21:33 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 30 Oct 2013 20:21:33 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 24 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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            9 years, 24 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_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>benety.goh@mongodb.com</customfieldvalue>
            <customfieldvalue>hari.khalsa@10gen.com</customfieldvalue>
            <customfieldvalue>max@10gen.com</customfieldvalue>
            <customfieldvalue>thomas.rueckstiess@mongodb.com</customfieldvalue>
            <customfieldvalue>zslayton</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrne93:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6998</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|ht0n4f:</customfieldvalue>

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