<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56: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-1383] Poor mongoexport performance when using a query</title>
                <link>https://jira.mongodb.org/browse/SERVER-1383</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;mongoexport is potentially very slow when passing in a query argument.&lt;/p&gt;

&lt;p&gt;Below is an example of a shell find() that takes 30ms for 571 result documents, but many minutes when trying to export these documents using mongoexport.&lt;/p&gt;

&lt;p&gt;If it is known for sure that a collection won&apos;t change during an export, can mongoexport be told to be more efficient and less strict when creating the output documents? Possibly it&apos;s a simple matter of allowing {$snapshot: false} to be specificed, or maybe there is another reason for the large change in efficiency.&lt;/p&gt;

&lt;p&gt;Either way, providing a simple query which uses an index such as the example given, is currently an unfeasible way to export collection subsets, and one must rely on other manual means to achieve this.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;Simple query in shell&lt;br/&gt;
&amp;gt; db.articles.find(
{&quot;authors.name&quot;: &quot;cannon cp&quot;}
&lt;p&gt;).explain() &lt;br/&gt;
{&lt;br/&gt;
	&quot;cursor&quot; : &quot;BtreeCursor authors.name_1&quot;,&lt;br/&gt;
	&quot;nscanned&quot; : 571,&lt;br/&gt;
	&quot;nscannedObjects&quot; : 571,&lt;br/&gt;
	&quot;n&quot; : 571,&lt;br/&gt;
	&quot;millis&quot; : 30,&lt;br/&gt;
	&quot;indexBounds&quot; : [&lt;br/&gt;
		[&lt;br/&gt;
			&lt;/p&gt;
{
				&quot;authors.name&quot; : &quot;cannon cp&quot;
			}
&lt;p&gt;,&lt;/p&gt;
			{
				&quot;authors.name&quot; : &quot;cannon cp&quot;
			}
&lt;p&gt;		]&lt;br/&gt;
	]&lt;br/&gt;
}&lt;/p&gt;&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;Same query in mongoexport takes multiple minutes with high nscanned&lt;br/&gt;
&amp;gt; ./mongoexport -vv -h localhost -c articles -d pubmed -q &apos;
{&quot;authors.name&quot;: &quot;cannon cp&quot;}
&lt;p&gt;&apos; -o articles.json&lt;br/&gt;
connected to: localhost&lt;br/&gt;
exported 571 records&lt;/p&gt;&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;
	&lt;ol&gt;
		&lt;li&gt;Server output&lt;br/&gt;
Thu Jul  8 14:58:51 query pubmed.articles reslen:174620 nscanned:1387320 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { query}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;  nreturned:101 39276ms&lt;br/&gt;
Thu Jul  8 15:03:23 getmore pubmed.articles cid:7259446948513230975 getMore: &lt;/p&gt;
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { query}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;  bytes:716901 nreturned:470 271669ms&lt;br/&gt;
Thu Jul  8 15:03:24 end connection 127.0.0.1:54779&lt;/p&gt;&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment>Thu Jul  8 18:58:12 db version v1.5.3, pdfile version 4.5&lt;br/&gt;
Thu Jul  8 18:58:12 git version: 068efc1b2356430c21a376f8963dd13979566fd4&lt;br/&gt;
Thu Jul  8 18:58:12 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41&lt;br/&gt;
</environment>
        <key id="12386">SERVER-1383</key>
            <summary>Poor mongoexport performance when using a query</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="crudson">Doug Hudson</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Jul 2010 20:07:09 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:32 +0000</updated>
                            <resolved>Thu, 23 Sep 2010 04:29:27 +0000</resolved>
                                    <version>1.5.3</version>
                                    <fixVersion>1.7.1</fixVersion>
                                    <component>Performance</component>
                                        <votes>2</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="18468" author="auto" created="Thu, 23 Sep 2010 18:45:18 +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: don&apos;t use snapshot with another query &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1383&quot; title=&quot;Poor mongoexport performance when using a query&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1383&quot;&gt;&lt;del&gt;SERVER-1383&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/d3d719c3aa72d63fe838f1e5eae7098e3bffe721&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/d3d719c3aa72d63fe838f1e5eae7098e3bffe721&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18456" author="auto" created="Thu, 23 Sep 2010 04:29:28 +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: don&apos;t use snapshot with another query &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1383&quot; title=&quot;Poor mongoexport performance when using a query&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1383&quot;&gt;&lt;del&gt;SERVER-1383&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/d3d719c3aa72d63fe838f1e5eae7098e3bffe721&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/d3d719c3aa72d63fe838f1e5eae7098e3bffe721&lt;/a&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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 23 Sep 2010 04:29:28 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 21 weeks, 6 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>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, 21 weeks, 6 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>auto</customfieldvalue>
            <customfieldvalue>crudson</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|hrpjwn:</customfieldvalue>

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

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

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