<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:55:11 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-802] Query optimization is doing a big scan for searches involves $in</title>
                <link>https://jira.mongodb.org/browse/SERVER-802</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;As described in &lt;a href=&quot;http://bit.ly/bURxwn&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bit.ly/bURxwn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;gt; db.hits.findOne() &lt;/p&gt;

&lt;p&gt;{ &quot;_id&quot;:ObjectId(&quot;4ba5a0409a59dc523d0a81dc&quot;), &lt;br/&gt;
  &quot;date&quot;: 1510, &lt;br/&gt;
  &quot;user&quot;: 21176417, &lt;br/&gt;
  &quot;word&quot;: 1, &lt;br/&gt;
  &quot;list&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;994953325, 2000523166&amp;#93;&lt;/span&gt; &lt;br/&gt;
} &lt;br/&gt;
&amp;gt; db.hits.count() &lt;br/&gt;
8663354 &lt;br/&gt;
&amp;gt; print(db.hits.totalIndexSize()) &lt;br/&gt;
1279240064 &lt;br/&gt;
&amp;gt; db.hits.find({d: {$gte:1500, $lte:1510}, w: {$in:&lt;span class=&quot;error&quot;&gt;&amp;#91;275, 317&amp;#93;&lt;/span&gt;} }).explain() &lt;/p&gt;

&lt;p&gt;{ &lt;br/&gt;
        &quot;cursor&quot; : &quot;BtreeCursor d_1_w_1_u_1&quot;, &lt;br/&gt;
        &quot;startKey&quot; : { &lt;br/&gt;
                &quot;d&quot; : 1500, &lt;br/&gt;
                &quot;w&quot; : 275, &lt;br/&gt;
                &quot;u&quot; : &lt;/p&gt;
{ 
                        &quot;$minElement&quot; : 1 
                }
&lt;p&gt; &lt;br/&gt;
        }, &lt;br/&gt;
        &quot;endKey&quot; : { &lt;br/&gt;
                &quot;d&quot; : 1510, &lt;br/&gt;
                &quot;w&quot; : 317, &lt;br/&gt;
                &quot;u&quot; : &lt;/p&gt;
{ 
                        &quot;$maxElement&quot; : 1 
                }
&lt;p&gt; &lt;br/&gt;
        }, &lt;br/&gt;
        &quot;nscanned&quot; : 2866468, &lt;br/&gt;
        &quot;n&quot; : 5033, &lt;br/&gt;
        &quot;millis&quot; : 44465, &lt;br/&gt;
        &quot;allPlans&quot; : [ &lt;br/&gt;
                { &lt;br/&gt;
                        &quot;cursor&quot; : &quot;BtreeCursor d_1_w_1_u_1&quot;, &lt;br/&gt;
                        &quot;startKey&quot; : { &lt;br/&gt;
                                &quot;d&quot; : 1500, &lt;br/&gt;
                                &quot;w&quot; : 275, &lt;br/&gt;
                                &quot;u&quot; : &lt;/p&gt;
{ 
                                        &quot;$minElement&quot; : 1 
                                }
&lt;p&gt; &lt;br/&gt;
                        }, &lt;br/&gt;
                        &quot;endKey&quot; : { &lt;br/&gt;
                                &quot;d&quot; : 1510, &lt;br/&gt;
                                &quot;w&quot; : 317, &lt;br/&gt;
                                &quot;u&quot; : &lt;/p&gt;
{ 
                                        &quot;$maxElement&quot; : 1 
                                }
&lt;p&gt; &lt;br/&gt;
                        } &lt;br/&gt;
                }, &lt;br/&gt;
                { &lt;br/&gt;
                        &quot;cursor&quot; : &quot;BasicCursor&quot;, &lt;br/&gt;
                        &quot;startKey&quot; : { &lt;br/&gt;
                        }, &lt;br/&gt;
                        &quot;endKey&quot; : { &lt;br/&gt;
                        } &lt;br/&gt;
                } &lt;br/&gt;
        ] &lt;br/&gt;
} &lt;/p&gt;

&lt;p&gt;Eliot replies: right now its not looking all all the sub-regions, just going from the front to back we can optimize at some point &lt;/p&gt;</description>
                <environment>Mac OSX 10.5.8&lt;br/&gt;
MongoDB: 1.3.3</environment>
        <key id="11584">SERVER-802</key>
            <summary>Query optimization is doing a big scan for searches involves $in</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="9">Done</resolution>
                                        <assignee username="aaron">Aaron Staple</assignee>
                                    <reporter username="alexdong">Alex Dong</reporter>
                        <labels>
                    </labels>
                <created>Mon, 22 Mar 2010 00:29:20 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:07 +0000</updated>
                            <resolved>Fri, 16 Jul 2010 12:51:52 +0000</resolved>
                                    <version>1.3.4</version>
                                    <fixVersion>1.5.5</fixVersion>
                                    <component>Querying</component>
                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="15864" author="auto" created="Fri, 16 Jul 2010 08:37:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;astaple&apos;, &apos;name&apos;: &apos;Aaron&apos;, &apos;email&apos;: &apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-802&quot; title=&quot;Query optimization is doing a big scan for searches involves $in&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-802&quot;&gt;&lt;del&gt;SERVER-802&lt;/del&gt;&lt;/a&gt; update explain format&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/94fab2e73fcdf50033b245ba7a9dd0174f253c27&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/94fab2e73fcdf50033b245ba7a9dd0174f253c27&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15861" author="auto" created="Fri, 16 Jul 2010 08:36:50 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;astaple&apos;, &apos;name&apos;: &apos;Aaron&apos;, &apos;email&apos;: &apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-802&quot; title=&quot;Query optimization is doing a big scan for searches involves $in&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-802&quot;&gt;&lt;del&gt;SERVER-802&lt;/del&gt;&lt;/a&gt; range / in skipping&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/5371a5e44870d111c730371b9b8aaaec36b27b1d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/5371a5e44870d111c730371b9b8aaaec36b27b1d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="13136" author="aaron" created="Mon, 22 Mar 2010 13:56:36 +0000"  >&lt;p&gt;We&apos;ll fix this, but for now you can get better index bounds if the $in key is first in your index &amp;#8211; eg an index on &lt;/p&gt;
{w:1,d:1}</comment>
                            <comment id="13121" author="alexdong" created="Mon, 22 Mar 2010 03:00:25 +0000"  >&lt;p&gt;Here is a test case for this case. Thanks a lot. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="10770">SERVER-371</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11798">SERVER-1026</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="10180" name="index_check8.js" size="746" author="alexdong" created="Mon, 22 Mar 2010 03:00:56 +0000"/>
                    </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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 22 Mar 2010 13:56:36 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 31 weeks, 5 days 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/SERVER-371'>SERVER-371</a></s>, <s><a href='https://jira.mongodb.org/browse/SERVER-1026'>SERVER-1026</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>
                            13 years, 31 weeks, 5 days 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>aaron</customfieldvalue>
            <customfieldvalue>alexdong</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpq2n:</customfieldvalue>

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

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

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