<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:20 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-192] query that just returns value in index should get data from index</title>
                <link>https://jira.mongodb.org/browse/SERVER-192</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;if you have something like&lt;br/&gt;
db.users.save( &lt;/p&gt;
{ name : &quot;&quot; , address... , etc... }
&lt;p&gt; )&lt;br/&gt;
db.users.ensureIndex( &lt;/p&gt;
{ name : 1 }
&lt;p&gt; )&lt;br/&gt;
and you do&lt;br/&gt;
db.users.find( {} , &lt;/p&gt;
{ name : 1 }
&lt;p&gt; )&lt;br/&gt;
it should only look at the index and never go to object.&lt;/p&gt;</description>
                <environment></environment>
        <key id="10369">SERVER-192</key>
            <summary>query that just returns value in index should get data from index</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="eliot">Eliot Horowitz</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Jul 2009 16:14:30 +0000</created>
                <updated>Tue, 12 Jul 2016 00:27:19 +0000</updated>
                            <resolved>Tue, 16 Nov 2010 21:12:15 +0000</resolved>
                                                    <fixVersion>1.7.3</fixVersion>
                                    <component>Querying</component>
                                        <votes>20</votes>
                                    <watches>13</watches>
                                                                                                                <comments>
                            <comment id="20376" author="eliot" created="Tue, 16 Nov 2010 21:12:15 +0000"  >&lt;p&gt;Works with the caveats of the cases linked above&lt;/p&gt;</comment>
                            <comment id="20375" author="auto" created="Tue, 16 Nov 2010 21:12:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: use data from indexes if possivle &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-192&quot; title=&quot;query that just returns value in index should get data from index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-192&quot;&gt;&lt;del&gt;SERVER-192&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
/mongodb/mongo/commit/2603a9632c21f9e56e780f57b15313ed9d8810ff&lt;/p&gt;</comment>
                            <comment id="20368" author="auto" created="Tue, 16 Nov 2010 20:01:43 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: safety for Projection&apos;s current state &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-192&quot; title=&quot;query that just returns value in index should get data from index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-192&quot;&gt;&lt;del&gt;SERVER-192&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2104&quot; title=&quot;covered index should support dotted fields&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2104&quot;&gt;&lt;del&gt;SERVER-2104&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
/mongodb/mongo/commit/598af81eaa74d1ee0a398b48f3c8174c7e643098&lt;/p&gt;</comment>
                            <comment id="20350" author="auto" created="Tue, 16 Nov 2010 08:11:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: worked towards covered indexes &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-192&quot; title=&quot;query that just returns value in index should get data from index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-192&quot;&gt;&lt;del&gt;SERVER-192&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
/mongodb/mongo/commit/fb109a067073d86dbf51baf093cf1820559e3674&lt;/p&gt;</comment>
                            <comment id="19953" author="auto" created="Tue, 2 Nov 2010 04:10:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: some thoughts on getting things from indexes &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1502&quot; title=&quot;Generate indexes on a permanent map/reduce collection before it&amp;#39;s swapped&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1502&quot;&gt;&lt;del&gt;SERVER-1502&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-192&quot; title=&quot;query that just returns value in index should get data from index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-192&quot;&gt;&lt;del&gt;SERVER-192&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/5f0427fdd8a466f073c5ae15d6dbbea2701b19a7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/5f0427fdd8a466f073c5ae15d6dbbea2701b19a7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="14206" author="scotthernandez" created="Wed, 12 May 2010 13:35:54 +0000"  >&lt;p&gt;I&apos;m testing on 1.5.1.&lt;/p&gt;

&lt;p&gt;I do &lt;em&gt;id only queries where I want all the info from the default _id&lt;/em&gt; index and it should not touch the table at all.&lt;/p&gt;

&lt;p&gt;I am working with natural keys here so I know the values of the _id, most of the time. In most of my queries I send along a filter for _id in &lt;span class=&quot;error&quot;&gt;&amp;#91;values&amp;#93;&lt;/span&gt;, but sometimes I need to get all the _id values to check for referential integrity in another collection (as a cleanup job).&lt;/p&gt;

&lt;p&gt;&amp;gt; db.idOnly.save({_id:1})&lt;br/&gt;
&amp;gt; db.idOnly.find({},{_id:1}).explain()&lt;br/&gt;
{&lt;br/&gt;
        &quot;cursor&quot; : &quot;BasicCursor&quot;,&lt;br/&gt;
        &quot;indexBounds&quot; : [ ],&lt;br/&gt;
        &quot;nscanned&quot; : 1,&lt;br/&gt;
        &quot;nscannedObjects&quot; : 1,&lt;br/&gt;
        &quot;n&quot; : 1,&lt;br/&gt;
        &quot;millis&quot; : 0,&lt;br/&gt;
        &quot;allPlans&quot; : [&lt;/p&gt;
                {
                        &quot;cursor&quot; : &quot;BasicCursor&quot;,
                        &quot;indexBounds&quot; : [ ]
                }
&lt;p&gt;        ]&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; db.idOnly.find({},{&lt;em&gt;id:1}).hint(&quot;_id&lt;/em&gt;&quot;).explain()&lt;br/&gt;
{&lt;br/&gt;
        &quot;cursor&quot; : &quot;BtreeCursor &lt;em&gt;id&lt;/em&gt;&quot;,&lt;br/&gt;
        &quot;indexBounds&quot; : [&lt;br/&gt;
                [&lt;br/&gt;
                        {&lt;br/&gt;
                                &quot;_id&quot; : &lt;/p&gt;
{
                                        &quot;$minElement&quot; : 1
                                }
&lt;p&gt;                        },&lt;br/&gt;
                        {&lt;br/&gt;
                                &quot;_id&quot; : &lt;/p&gt;
{
                                        &quot;$maxElement&quot; : 1
                                }
&lt;p&gt;                        }&lt;br/&gt;
                ]&lt;br/&gt;
        ],&lt;br/&gt;
        &quot;nscanned&quot; : 1,&lt;br/&gt;
        &quot;nscannedObjects&quot; : 1,&lt;br/&gt;
        &quot;n&quot; : 1,&lt;br/&gt;
        &quot;millis&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="13193" author="eliot" created="Fri, 26 Mar 2010 13:29:18 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-822&quot; title=&quot;Field exclusion on _id should actually exclude _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-822&quot;&gt;&lt;del&gt;SERVER-822&lt;/del&gt;&lt;/a&gt; will definitely be supported for this.&lt;br/&gt;
So at least doing this will be possible, if not a bit annoying.&lt;/p&gt;</comment>
                            <comment id="13191" author="mike" created="Fri, 26 Mar 2010 13:00:10 +0000"  >&lt;p&gt;one possible solution to the _id problem is &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-822&quot; title=&quot;Field exclusion on _id should actually exclude _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-822&quot;&gt;&lt;del&gt;SERVER-822&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="13190" author="scotthernandez" created="Fri, 26 Mar 2010 12:59:28 +0000"  >&lt;p&gt;I&apos;m all for making _id optional; let me decide the performance ramifications when I make the query. However... the default should return the _id;&lt;/p&gt;</comment>
                            <comment id="13012" author="eliot" created="Mon, 15 Mar 2010 16:53:21 +0000"  >&lt;p&gt;this is complicated since we return _id no matter what.&lt;br/&gt;
we don&apos;t keep _id in the index for space reasons.&lt;br/&gt;
so we either have to not return _id or add _id to the index if we wanted to do this...&lt;br/&gt;
or we can add a flag to make this optional&lt;/p&gt;</comment>
                            <comment id="13011" author="auto" created="Mon, 15 Mar 2010 16:52:23 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: commited and reverted so the code exists&lt;br/&gt;
Revert &quot;stalled attempt at covered index lookup &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-192&quot; title=&quot;query that just returns value in index should get data from index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-192&quot;&gt;&lt;del&gt;SERVER-192&lt;/del&gt;&lt;/a&gt; see case for why stalled&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit aa6c394b72667bb59effcdb4f13a0c70202e7258.&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/b425b6bfe0e212768fc99e4a19635ecb22ab6ba5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/b425b6bfe0e212768fc99e4a19635ecb22ab6ba5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="13010" author="auto" created="Mon, 15 Mar 2010 16:52:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: stalled attempt at covered index lookup &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-192&quot; title=&quot;query that just returns value in index should get data from index&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-192&quot;&gt;&lt;del&gt;SERVER-192&lt;/del&gt;&lt;/a&gt; see case for why stalled&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/aa6c394b72667bb59effcdb4f13a0c70202e7258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/aa6c394b72667bb59effcdb4f13a0c70202e7258&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="11607">SERVER-822</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="13709">SERVER-2104</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="13717">SERVER-2109</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, 15 Mar 2010 16:52:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 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/SERVER-822'>SERVER-822</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, 14 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>mike</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpx1z:</customfieldvalue>

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

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

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