<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:39 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>[JAVA-1035] index, skip and limit ignored?</title>
                <link>https://jira.mongodb.org/browse/JAVA-1035</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;running this query (rails console)&lt;/p&gt;

&lt;p&gt;irb(main):005:0&amp;gt; Company.where().order(&lt;span class=&quot;error&quot;&gt;&amp;#91;:updated_at, :desc&amp;#93;&lt;/span&gt;).page(2350).per(100)&lt;br/&gt;
=&amp;gt; #&amp;lt;Mongoid::Criteria&lt;br/&gt;
  selector: {},&lt;br/&gt;
  options:  {:sort=&amp;gt;[&lt;span class=&quot;error&quot;&gt;&amp;#91;:updated_at, :desc&amp;#93;&lt;/span&gt;], :limit=&amp;gt;100, :skip=&amp;gt;234900},&lt;br/&gt;
  class:    Company,&lt;br/&gt;
  embedded: false&amp;gt;&lt;/p&gt;

&lt;p&gt;i get this op in the log:&lt;/p&gt;

&lt;p&gt;PRIMARY&amp;gt; db.currentOp()&lt;br/&gt;
{&lt;br/&gt;
	&quot;inprog&quot; : [&lt;br/&gt;
		{&lt;br/&gt;
			&quot;opid&quot; : 452130769,&lt;br/&gt;
			&quot;active&quot; : true,&lt;br/&gt;
			&quot;lockType&quot; : &quot;read&quot;,&lt;br/&gt;
			&quot;waitingForLock&quot; : false,&lt;br/&gt;
			&quot;secs_running&quot; : 5,&lt;br/&gt;
			&quot;op&quot; : &quot;query&quot;,&lt;br/&gt;
			&quot;ns&quot; : &quot;syn_production.contacts&quot;,&lt;br/&gt;
			&quot;query&quot; : {&lt;br/&gt;
				&quot;$query&quot; : {&lt;br/&gt;
					&quot;_type&quot; : &lt;/p&gt;
{
						&quot;$in&quot; : [
							&quot;Company&quot;
						]
					}
&lt;p&gt;				},&lt;br/&gt;
				&quot;$orderby&quot; : &lt;/p&gt;
{
					&quot;updated_at&quot; : -1
				}
&lt;p&gt;			},&lt;br/&gt;
			&quot;client&quot; : &quot;10.32.2.108:34235&quot;,&lt;br/&gt;
			&quot;desc&quot; : &quot;conn&quot;,&lt;br/&gt;
			&quot;threadId&quot; : &quot;0x453ac940&quot;,&lt;br/&gt;
			&quot;connectionId&quot; : 20536186,&lt;br/&gt;
			&quot;numYields&quot; : 0&lt;br/&gt;
		}&lt;br/&gt;
	]&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;also, it&apos;s not using this index:&lt;/p&gt;

&lt;p&gt;PRIMARY&amp;gt; db.contacts.getIndexes()&lt;br/&gt;
[&lt;br/&gt;
        ....,&lt;br/&gt;
	{&lt;br/&gt;
		&quot;v&quot; : 1,&lt;br/&gt;
		&quot;key&quot; : &lt;/p&gt;
{
			&quot;updated_at&quot; : -1
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;ns&quot; : &quot;syn_production.contacts&quot;,&lt;br/&gt;
		&quot;name&quot; : &quot;updated_at_-1&quot;&lt;br/&gt;
	}&lt;br/&gt;
]&lt;/p&gt;

&lt;p&gt;any pointers would be great&lt;/p&gt;</description>
                <environment>rails, mongoid, kaminari&lt;br/&gt;
&lt;br/&gt;
mongo (1.6.0)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mongoid (2.4.5)</environment>
        <key id="96613">JAVA-1035</key>
            <summary>index, skip and limit ignored?</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="nattsoi">Nathan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 31 Oct 2013 18:57:55 +0000</created>
                <updated>Wed, 11 Sep 2019 19:11:45 +0000</updated>
                            <resolved>Thu, 31 Oct 2013 19:04:05 +0000</resolved>
                                    <version>2.2</version>
                                                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="449637" author="jeff.yemin" created="Thu, 31 Oct 2013 19:04:05 +0000"  >&lt;p&gt;OK, thanks,&lt;/p&gt;</comment>
                            <comment id="449634" author="jeff.yemin" created="Thu, 31 Oct 2013 19:02:15 +0000"  >&lt;p&gt;Ah, I didn&apos;t realize.  I&apos;ll move this for you.&lt;/p&gt;</comment>
                            <comment id="449633" author="jeff.yemin" created="Thu, 31 Oct 2013 19:01:23 +0000"  >&lt;p&gt;Since it&apos;s a question rather than a bug or feature request, I would try Stack Overflow.&lt;/p&gt;</comment>
                            <comment id="449632" author="nattsoi" created="Thu, 31 Oct 2013 19:00:52 +0000"  >&lt;p&gt;ahh.. how about commercial support. feel free to delete. ill move it&lt;/p&gt;</comment>
                            <comment id="449630" author="nattsoi" created="Thu, 31 Oct 2013 19:00:05 +0000"  >&lt;p&gt;haha, no idea where it should go. suggestions?&lt;/p&gt;</comment>
                            <comment id="449626" author="jeff.yemin" created="Thu, 31 Oct 2013 18:58:55 +0000"  >&lt;p&gt;Hi Nathan,&lt;/p&gt;

&lt;p&gt;Why did you open this issue in the JAVA driver project?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrtx4n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>88499</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>