<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:52 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-371] optimize compound index multiple ranges</title>
                <link>https://jira.mongodb.org/browse/SERVER-371</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;test in jstests/index_check6.js&lt;/p&gt;</description>
                <environment></environment>
        <key id="10770">SERVER-371</key>
            <summary>optimize compound index multiple ranges</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="aaron">Aaron Staple</assignee>
                                    <reporter username="eliot">Eliot Horowitz</reporter>
                        <labels>
                    </labels>
                <created>Mon, 19 Oct 2009 09:52:54 +0000</created>
                <updated>Tue, 12 Jul 2016 00:29:31 +0000</updated>
                            <resolved>Thu, 8 Jul 2010 02:32:20 +0000</resolved>
                                                    <fixVersion>1.5.5</fixVersion>
                                    <component>Querying</component>
                                        <votes>8</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="15559" author="auto" created="Thu, 8 Jul 2010 02:31:23 +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-371&quot; title=&quot;optimize compound index multiple ranges&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-371&quot;&gt;&lt;del&gt;SERVER-371&lt;/del&gt;&lt;/a&gt; mix skip types to scan fewer unused keys&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/a84e4a13eb4e9ce2cce7a9509dea60337676db37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/a84e4a13eb4e9ce2cce7a9509dea60337676db37&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15532" author="auto" created="Wed, 7 Jul 2010 17:00:08 +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-371&quot; title=&quot;optimize compound index multiple ranges&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-371&quot;&gt;&lt;del&gt;SERVER-371&lt;/del&gt;&lt;/a&gt; don&apos;t skip when spec&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/e3a60f43b336a4d16b8f86fa5aa8a159f773951f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/e3a60f43b336a4d16b8f86fa5aa8a159f773951f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="15531" author="auto" created="Wed, 7 Jul 2010 17:00:07 +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-371&quot; title=&quot;optimize compound index multiple ranges&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-371&quot;&gt;&lt;del&gt;SERVER-371&lt;/del&gt;&lt;/a&gt; btree skipping&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/3e788cf58882dd173daee339444678ea963c8978&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/3e788cf58882dd173daee339444678ea963c8978&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="14952" author="eliot" created="Tue, 22 Jun 2010 14:13:34 +0000"  >&lt;p&gt;Yeah - at some point we may want to add a new index type to make these really fast - but i think just optimizing the ranges scanning is good enough for now&lt;/p&gt;</comment>
                            <comment id="14951" author="aaron" created="Tue, 22 Jun 2010 14:10:00 +0000"  >&lt;p&gt;@eliot - Apparently it&apos;s also possible to do a space filling mapping from multi dimensional data to a single dimension and do a multidimensional query on a 1d index that way (similar to our geo queries).  The indexes would have to be created specially for this, the same as with our geo indexes.  Here is a rough description &amp;lt;&lt;a href=&quot;http://www.scholarpedia.org/article/B-tree_and_UB-tree#UB-trees_for_Multidimensional_Applications&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.scholarpedia.org/article/B-tree_and_UB-tree#UB-trees_for_Multidimensional_Applications&lt;/a&gt;&amp;gt;.&lt;/p&gt;

&lt;p&gt;I imagine we don&apos;t want to do this right now, but just thought I&apos;d throw it out there and check.&lt;/p&gt;</comment>
                            <comment id="14915" author="eliot" created="Mon, 21 Jun 2010 17:31:42 +0000"  >&lt;p&gt;@aaron - that sounds correct&lt;/p&gt;</comment>
                            <comment id="14752" author="aaron" created="Mon, 14 Jun 2010 16:28:04 +0000"  >&lt;p&gt;So since basically all of our data types are continuous the best way I know of to implement this is as follows.  Say our constraints are 0 &amp;lt;= x &amp;lt;= 5, 10 &amp;lt;= y &amp;lt;= 15 and we have an index on &lt;/p&gt;
{x:1,y:1}
&lt;p&gt;.  We first scan from x=0,y=10 to x=0,y=15.  Then as efficiently as possible we traverse the btree from x=0,y=15 to x=a where a is the smallest existing value of x which is &amp;gt; 0.  Then we look for x=a,y=b where b is the smallest value of y between 10 and 15.  If there is a b, we scan from x=a,y=b to x=a,y=15.  Then we find the next lowest value of x, set that to a, and repeat.&lt;/p&gt;

&lt;p&gt;Eliot, do you want me to implement this?&lt;/p&gt;</comment>
                            <comment id="12649" author="benno" created="Mon, 1 Mar 2010 19:21:16 +0000"  >&lt;p&gt;Similar.  We have a number of values that we want to index and we want to constrain our results to a given range for some or all of the values.  So imagine having n axes and you want to find the values that fall inside a given &quot;box&quot;.&lt;/p&gt;</comment>
                            <comment id="12638" author="eliot" created="Mon, 1 Mar 2010 16:47:24 +0000"  >&lt;p&gt;does your example follow exactly the example in index_check6?&lt;/p&gt;</comment>
                            <comment id="12636" author="benno" created="Mon, 1 Mar 2010 16:27:46 +0000"  >&lt;p&gt;It&apos;s a pressing need for something we have here though.  I&apos;d happily work on something short term that can be replaced later.  Alternatively I can index things outside mongodb but if I can use mongo itself I&apos;d far prefer that.&lt;/p&gt;</comment>
                            <comment id="12614" author="eliot" created="Mon, 1 Mar 2010 07:47:13 +0000"  >&lt;p&gt;probably FieldRange...  This code may change a bit soon though, and is a bit involved - so a touch place to start &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="12613" author="benno" created="Mon, 1 Mar 2010 01:11:54 +0000"  >&lt;p&gt;If I wanted to have a go at fixing this, where should I start?  I&apos;ve been having a look through the query optimizer code among other things but it&apos;d help to have a few pointers.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="11584">SERVER-802</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>12.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 1 Mar 2010 01:11:54 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 33 weeks 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>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, 33 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aaron</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>benno</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpv9b:</customfieldvalue>

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

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

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