<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:01: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-2773] Allow jumps in the btree of indexes</title>
                <link>https://jira.mongodb.org/browse/SERVER-2773</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;It should be possible to jump to prefixes of (indexed) keys with the cursor and then move until that prefix changes (or beyond).&lt;/p&gt;</description>
                <environment></environment>
        <key id="15138">SERVER-2773</key>
            <summary>Allow jumps in the btree of indexes</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="yannick">Yannick Koechlin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Mar 2011 20:17:55 +0000</created>
                <updated>Mon, 24 Oct 2011 20:44:19 +0000</updated>
                            <resolved>Mon, 24 Oct 2011 20:44:19 +0000</resolved>
                                                                    <component>Index Maintenance</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="62333" author="ian@10gen.com" created="Mon, 24 Oct 2011 20:44:19 +0000"  >&lt;p&gt;@yannick, I&apos;m closing as &apos;wont fix&apos; given the time lapsed since last comment, but please reopen with the requested clarification if you continue to think this should be addressed.&lt;/p&gt;</comment>
                            <comment id="26229" author="eliot" created="Fri, 18 Mar 2011 15:26:59 +0000"  >&lt;p&gt;Still don&apos;t see why this is different than $gt&lt;/p&gt;</comment>
                            <comment id="26080" author="yannick" created="Thu, 17 Mar 2011 13:00:22 +0000"  >&lt;p&gt;ok sorry. here is the full context:&lt;/p&gt;

&lt;p&gt;i have built a triple store with pluggable storage backends. The main backend is Kyoto Cabinets B+Tree and then i did an adapter for mongodb.&lt;br/&gt;
a triplestore saves RDF Statements in the form  (subject,predicate,object). Now i do a 6 fold index for every combination: SPO,SOP,OSP,OPS,PSO,PSO.&lt;br/&gt;
to solve queries i now can resolve triples with any of the terms missing.  e.g.  i want to have all triples with (subject=&quot;x&quot;, object=&quot;y&quot; ) i just go to the SO or OS index and jump to the offset. this gives set a. now there can be a second query where i want to know (subject=&quot;x&quot;, object=&quot;z&quot; ). the intersection of these two queries will give my solution for a set of predicates! &lt;/p&gt;

&lt;p&gt;now for mongodb:&lt;br/&gt;
inserted the triples as   &lt;/p&gt;
{ &quot;s&quot;:Binary(&quot;md5hashOfSubject&quot;, MD5_SUBTYPE) , &quot;p&quot;:Binary(&quot;md5hashOfPredicate&quot;, MD5_SUBTYPE), &quot;o&quot;:Binary(&quot;md5hashOfObject&quot;, MD5_SUBTYPE) }
&lt;p&gt;  .&lt;/p&gt;

&lt;p&gt;then i do all 6 indexes:&lt;br/&gt;
db.ensureIndex( &lt;/p&gt;
{ &quot;s&quot;:1, &quot;p&quot;:1,&quot;o&quot;:1 }
&lt;p&gt; )&lt;br/&gt;
db.spo.ensureIndex( &lt;/p&gt;
{ &quot;s&quot;:1, &quot;o&quot;:1,&quot;p&quot;:1 }
&lt;p&gt; )&lt;br/&gt;
etc...&lt;/p&gt;

&lt;p&gt;so now i want to solve the query from the example above. while i can just stream all results from both subqueries and mergejoin them on the client that has a disadvantage:&lt;br/&gt;
one set could be pretty small but its keys are low in the tree of the other set, thus i have to scan the second set for a long time. thus: jump in the tree, since we know the lowest possible key.&lt;/p&gt;

&lt;p&gt;so the problem now is, that it generates significant overhead on the client side if i have to create a new cursor for every of these jumps.&lt;br/&gt;
as  mentioned before, the fastest way of course would be to join the sets directly on the (routing)server, since no decode would happen.&lt;/p&gt;

&lt;p&gt;bottom line: i just want to use the distributed b+tree of mongodb as fast and direct as possible.&lt;/p&gt;


&lt;p&gt;ps. if i do db.ensureIndex( &lt;/p&gt;
{ &quot;s&quot;:1, &quot;p&quot;:1,&quot;o&quot;:1 }
&lt;p&gt; ) and then db.ensureIndex( &lt;/p&gt;
{ &quot;s&quot;:1, &quot;p&quot;:1 }
&lt;p&gt; ) the second gets generated. necessary?&lt;/p&gt;</comment>
                            <comment id="26061" author="eliot" created="Thu, 17 Mar 2011 06:35:50 +0000"  >&lt;p&gt;I&apos;m sorry, but I&apos;m totally lost by your example...&lt;/p&gt;

&lt;p&gt;Can you provide sample input and what you want out?&lt;/p&gt;
</comment>
                            <comment id="26039" author="yannick" created="Wed, 16 Mar 2011 21:31:26 +0000"  >&lt;p&gt;sure:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/873350&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/873350&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;i simplified this from my working code, hope you get the point. &lt;/p&gt;

&lt;p&gt;actually i am doing a set intersection by merge joining. is there a faster way to do it? &lt;/p&gt;

&lt;p&gt;but even if, you could imagine that one set is not in mongodb so its still relevant.&lt;/p&gt;


&lt;p&gt;edit: of course the possibility of merge joining documents by a key directly on the mongos would be great and even faster&lt;/p&gt;</comment>
                            <comment id="26031" author="eliot" created="Wed, 16 Mar 2011 21:05:51 +0000"  >&lt;p&gt;I&apos;m a bit confused, can you send an example of what you&apos;re trying to do&lt;/p&gt;</comment>
                            <comment id="26030" author="yannick" created="Wed, 16 Mar 2011 21:02:46 +0000"  >&lt;p&gt;It can be emulated, in fact i am doing that. &lt;br/&gt;
But you need to generate a new cursor and that makes things more complicated and slower. &lt;/p&gt;

&lt;p&gt;At least with pymongo it works that way. This means that you can not build a simple generator like for &quot;doc in cursor:&quot; and jump with generators send() command, since you need to replace the cursor.&lt;/p&gt;
</comment>
                            <comment id="26028" author="eliot" created="Wed, 16 Mar 2011 20:34:41 +0000"  >&lt;p&gt;Can you provide an example where this can&apos;t be emulated with $gt?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 16 Mar 2011 20:34:41 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 17 weeks, 2 days 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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 17 weeks, 2 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>eliot</customfieldvalue>
            <customfieldvalue>ian@mongodb.com</customfieldvalue>
            <customfieldvalue>yannick</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp3gf:</customfieldvalue>

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

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

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