<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:06:11 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-4506] aggregation:  optimize by pushing matches to earlier in a pipeline</title>
                <link>https://jira.mongodb.org/browse/SERVER-4506</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;An aggregation pipeline using $match should be optimized so that the $match is moved as close as possible to the front of the pipeline, reducing the number of documents passing through each subsequent stage.&lt;/p&gt;

&lt;p&gt;Work is planned for the following optimizations, and is tracked in these tickets:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;$match and $unwind: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-20506&quot; title=&quot;Conditionally order $match with $unwind&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-20506&quot;&gt;&lt;del&gt;SERVER-20506&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;$match and $lookup: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-21612&quot; title=&quot;Combine post $lookup $match on looked up field&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-21612&quot;&gt;&lt;del&gt;SERVER-21612&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;$match and $geoNear: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-23466&quot; title=&quot;$match should be moved into the query field of the $geoNear stage, where possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-23466&quot;&gt;SERVER-23466&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;$match and $project: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-19153&quot; title=&quot;Conditionally push $match before $project&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-19153&quot;&gt;&lt;del&gt;SERVER-19153&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;&lt;em&gt;&lt;b&gt;Old Description&lt;/b&gt;&lt;/em&gt;&lt;br/&gt;
This is an optimization we can apply in the future.&lt;/p&gt;

&lt;p&gt;Applying matches before other operations allows less work to be done in the pipeline because documents will have been filtered out.&lt;/p&gt;

&lt;p&gt;Matches can&apos;t be pushed earlier than just anything.  For example, a $match can&apos;t be pushed ahead of a $skip or $limit, because it will change the results.  On the other hand, a $match can be pushed ahead of a $project when it doesn&apos;t depend on a computed value in the project &amp;#8211; field renames don&apos;t alter anything except the references in the $match.&lt;/p&gt;

&lt;p&gt;Being able to push matches earlier will allow us to use indexes for the underlying query.&lt;/p&gt;</description>
                <environment></environment>
        <key id="26713">SERVER-4506</key>
            <summary>aggregation:  optimize by pushing matches to earlier in a pipeline</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="3">Duplicate</resolution>
                                        <assignee username="benjamin.murphy">Benjamin Murphy</assignee>
                                    <reporter username="dan@mongodb.com">Daniel Pasette</reporter>
                        <labels>
                            <label>bi-performance</label>
                            <label>optimization</label>
                            <label>performance</label>
                    </labels>
                <created>Thu, 15 Dec 2011 21:40:28 +0000</created>
                <updated>Mon, 11 Nov 2019 21:34:09 +0000</updated>
                            <resolved>Fri, 1 Apr 2016 17:57:36 +0000</resolved>
                                                                    <component>Aggregation Framework</component>
                                        <votes>5</votes>
                                    <watches>8</watches>
                                                                                                                    <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="213329">SERVER-19153</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="276709">SERVER-23466</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="230529">SERVER-20506</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="240591">SERVER-21612</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="106282">SERVER-12376</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="230529">SERVER-20506</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="10927">SERVER-447</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="230529">SERVER-20506</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>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.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>Mon, 8 Feb 2016 19:43:15 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 9 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-541</customfieldvalue>
                        </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>asya.kamsky@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 9 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>benjamin.murphy</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroj0n:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4147</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="898">Query 10 (02/22/16)</customfieldvalue>
    <customfieldvalue id="899">Query 11 (03/14/16)</customfieldvalue>
    <customfieldvalue id="967">Query 12 (04/04/16)</customfieldvalue>

                        </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|hrirkv:</customfieldvalue>

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