<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:56:17 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-40909] push down $skip stage to query when possible</title>
                <link>https://jira.mongodb.org/browse/SERVER-40909</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Not sure why we don&apos;t do this:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.skip.explain().aggregate([{$match:{a:{$gte:7}}},{$sort:{a:1}},{$skip:2}])&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	&quot;stages&quot; : [&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			&quot;$cursor&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;query&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;a&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;$gte&quot; : 7&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;sort&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;a&quot; : 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;queryPlanner&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;plannerVersion&quot; : 1,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;namespace&quot; : &quot;agg.skip&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;indexFilterSet&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;parsedQuery&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;a&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;$gte&quot; : 7&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;winningPlan&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;stage&quot; : &quot;FETCH&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;inputStage&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;stage&quot; : &quot;IXSCAN&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;keyPattern&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								&quot;a&quot; : 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;indexName&quot; : &quot;a_1&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isMultiKey&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;multiKeyPaths&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								&quot;a&quot; : [ ]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isUnique&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isSparse&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isPartial&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;indexVersion&quot; : 2,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;direction&quot; : &quot;forward&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;indexBounds&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								&quot;a&quot; : [&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;									&quot;[7.0, inf.0]&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;rejectedPlans&quot; : [ ]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			&quot;$skip&quot; : NumberLong(2)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	],&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	&quot;ok&quot; : 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.skip.explain().aggregate([{$match:{a:{$gte:7}}},{$sort:{a:1}},{$skip:2},{$limit:1}])&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	&quot;stages&quot; : [&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			&quot;$cursor&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;query&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;a&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;$gte&quot; : 7&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;sort&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;a&quot; : 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;limit&quot; : NumberLong(3),&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				&quot;queryPlanner&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;plannerVersion&quot; : 1,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;namespace&quot; : &quot;agg.skip&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;indexFilterSet&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;parsedQuery&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;a&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;$gte&quot; : 7&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;winningPlan&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;stage&quot; : &quot;FETCH&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						&quot;inputStage&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;stage&quot; : &quot;IXSCAN&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;keyPattern&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								&quot;a&quot; : 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;indexName&quot; : &quot;a_1&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isMultiKey&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;multiKeyPaths&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								&quot;a&quot; : [ ]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isUnique&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isSparse&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;isPartial&quot; : false,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;indexVersion&quot; : 2,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;direction&quot; : &quot;forward&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							&quot;indexBounds&quot; : {&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								&quot;a&quot; : [&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;									&quot;[7.0, inf.0]&quot;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;								]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;							}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;						}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;					&quot;rejectedPlans&quot; : [ ]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;				}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;			&quot;$skip&quot; : NumberLong(2)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;		}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	],&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	&quot;ok&quot; : 1&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;In the first case we don&apos;t push anything down, in the second case we push down limit(3) - sum of skip and limit values - but in both cases we then do the skip in agg in the next stage.&lt;/p&gt;</description>
                <environment></environment>
        <key id="751023">SERVER-40909</key>
            <summary>push down $skip stage to query when possible</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="13201">Fixed</resolution>
                                        <assignee username="nikita.lapkov@mongodb.com">Nikita Lapkov</assignee>
                                    <reporter username="asya.kamsky@mongodb.com">Asya Kamsky</reporter>
                        <labels>
                    </labels>
                <created>Tue, 30 Apr 2019 16:11:09 +0000</created>
                <updated>Sun, 29 Oct 2023 22:21:31 +0000</updated>
                            <resolved>Mon, 5 Oct 2020 15:58:28 +0000</resolved>
                                                    <fixVersion>4.9.0</fixVersion>
                                    <component>Aggregation Framework</component>
                                        <votes>1</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="3427737" author="JIRAUSER1255444" created="Tue, 6 Oct 2020 08:57:57 +0000"  >&lt;p&gt;Benchmarks results arrived. I have picked the&#160;&lt;a href=&quot;https://evergreen.mongodb.com/task/performance_linux_wt_standalone_agg_query_comparison_cb7bd54a49e33a5e3b391544fdee09480dbbc1cc_20_10_05_16_36_36##comparehashes=9aa940336725c230a80bc4d7022e60e8c4361678&amp;amp;threads=all&amp;amp;selected.Aggregation.CountsFullCollection=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.CountsIntIDRange=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.DistinctWithIndex=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.DistinctWithIndexAndQuery=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.DistinctWithoutIndex=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.DistinctWithoutIndexAndQuery=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.SortByComputedField=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.SortProjectWithBigDocuments=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.SortProjectSkipWithBigDocuments=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.SortSkipProjectWithBigDocuments=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.ProjectSkipWithBigDocuments=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.Empty=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.NoMatch=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.IntIdFindOne=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.IntNonIdFindOne=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.IntIDRange=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.RegexPrefixFindOne=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.TwoInts=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.StringUnindexedInPredWithNonSimpleCollation=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.StringUnindexedInPredWithSimpleCollation=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.UnindexedLargeInMatching=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.UnindexedLargeInUnsortedMatching=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.UnindexedVeryLargeInSortedMatching=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.UnindexedVeryLargeInUnsortedMatching=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.UnindexedLargeInNonMatching=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.UnindexedLargeInUnsortedNonMatching=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.IntNonIdFindOneProjectionCovered=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.IntNonIdFindOneProjection=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.IntNonIdFindProjectionCovered=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.FindProjection=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.FindWideDocProjection=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.FindProjectionThreeFieldsCovered=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.FindProjectionThreeFields=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.FindProjectionDottedField=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.FindProjectionDottedField.Indexed=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.SortByArrayOfScalars=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.SortByArrayOfNestedDocuments=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.CoveredNonBlockingSort=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.CoveredBlockingSort=1%252C2%252C4%252C8&amp;amp;selected.Aggregation.NonCoveredBlockingSortWithIndexToSupportSort=1%252C2%252C4%252C8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;closest&lt;/a&gt;&#160;tested commit after this change was merged. The results are:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Aggregation.SortProjectSkipWithBigDocuments:&#160;&lt;b&gt;+8.3%&lt;/b&gt;&lt;/li&gt;
	&lt;li&gt;Aggregation.SortSkipProjectWithBigDocuments:&#160;&lt;b&gt;+8.4%&lt;/b&gt;&lt;/li&gt;
	&lt;li&gt;Aggregation.ProjectSkipWithBigDocuments:&#160;&lt;b&gt;+260.3%&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="3425608" author="xgen-internal-githook" created="Mon, 5 Oct 2020 15:53:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40909&quot; title=&quot;push down $skip stage to query when possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40909&quot;&gt;&lt;del&gt;SERVER-40909&lt;/del&gt;&lt;/a&gt; push down $skip stage to query when possible&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/32cea84dcc86009cc09d8e30cd7534fac6fb2242&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/32cea84dcc86009cc09d8e30cd7534fac6fb2242&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3420542" author="JIRAUSER1255444" created="Thu, 1 Oct 2020 13:39:18 +0000"  >&lt;p&gt;We need to wait to accumulate enough history for new tests on master branch. The plan is to push changes on Monday.&lt;/p&gt;</comment>
                            <comment id="3420456" author="xgen-internal-githook" created="Thu, 1 Oct 2020 13:10:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nikita Lapkov&apos;, &apos;email&apos;: &apos;nikita.lapkov@mongodb.com&apos;, &apos;username&apos;: &apos;laplab&apos;}
&lt;p&gt;Message: PERF-1989 Add benchmarks to measure impact of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-40909&quot; title=&quot;push down $skip stage to query when possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-40909&quot;&gt;&lt;del&gt;SERVER-40909&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-perf/commit/c57034f09d022e4ee2882c44ae65ba0ba2b1150f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-perf/commit/c57034f09d022e4ee2882c44ae65ba0ba2b1150f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3405695" author="JIRAUSER1255444" created="Tue, 22 Sep 2020 17:37:33 +0000"  >&lt;p&gt;Patch is ready to merge, Evergreen is okay. Marking this as blocked until&#160;PERF-1989 is resolved.&lt;/p&gt;</comment>
                            <comment id="3395101" author="ian.boros" created="Tue, 15 Sep 2020 17:50:24 +0000"  >&lt;p&gt;We should consider doing&#160;PERF-1989&#160;to deal with the $skips that get added to the microbenchmarks before merging this.&lt;/p&gt;</comment>
                            <comment id="3387411" author="JIRAUSER1255444" created="Fri, 11 Sep 2020 15:17:35 +0000"  >&lt;p&gt;Turns out I was measuring patch with --opt=off. Here are updated results for builds with --opt=on.&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;&#160;&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;SORT =&amp;gt; SKIP =&amp;gt; PROJECT&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;PROJECT =&amp;gt; SORT =&amp;gt; SKIP&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Regression&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1 thread&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1.5706201340263124&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1.5374107741112062&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;-2.16%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;8 threads&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;3.97652939101386&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;3.8824184365407817&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;-2.42%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;Note: 32 threads consistently gave me 0 ops/sec for both builds for some reason, so I have used 8 threads instead.&lt;/p&gt;</comment>
                            <comment id="3385346" author="JIRAUSER1255444" created="Thu, 10 Sep 2020 14:54:54 +0000"  >&lt;p&gt;After talking with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=bernard.gorman&quot; class=&quot;user-hover&quot; rel=&quot;bernard.gorman&quot;&gt;bernard.gorman&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch&quot; class=&quot;user-hover&quot; rel=&quot;david.storch&quot;&gt;david.storch&lt;/a&gt; we decided to benchmark PROJECT =&amp;gt; SORT =&amp;gt; SKIP and SORT =&amp;gt; SKIP =&amp;gt; PROJECT plans on some case where the latter should perform better.&lt;/p&gt;

&lt;p&gt;I have used aggregation pipeline $sort =&amp;gt; $project =&amp;gt; $skip for all tests, where $skip omits all documents from collection except one. The projection and sample document were taken from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30633&quot; title=&quot;Large performance regression for large aggregation queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30633&quot;&gt;&lt;del&gt;SERVER-30633&lt;/del&gt;&lt;/a&gt;. I have removed all expressions from projection because they were preventing pushing of PROJECT behind SORT. Final projection contained 78849 inclusion rules. The sample document contained 14660 leaf nodes. Collection used for testing contained 500 such documents. The number of documents was chosen to allow SORT stage sort everything in memory. See &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/277935/277935_sample_document.json&quot; title=&quot;sample_document.json attached to SERVER-40909&quot;&gt;sample_document.json&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/attachment/277934/277934_huge_projection_pipeline.js&quot; title=&quot;huge_projection_pipeline.js attached to SERVER-40909&quot;&gt;huge_projection_pipeline.js&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.mongodb.org/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; for details.&lt;/p&gt;

&lt;p&gt;The same query was run on 2 builds:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Original patch from &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt;. Does pushdown of $skip to query stage. Does not push PROJECT behind SORT if there is SKIP between them.&lt;/li&gt;
	&lt;li&gt;The same patch, but always pushing PROJECT behind SORT, even if there is a SKIP between them&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;First build was producing SORT =&amp;gt; SKIP =&amp;gt; PROJECT plan for the query, second build returned PROJECT =&amp;gt; SORT =&amp;gt; SKIP plan.&lt;/p&gt;

&lt;p&gt;Each build was configured as described &lt;a href=&quot;https://wiki.corp.mongodb.com/display/~dianna.hohensee/How+to+Run+A+Performance+Workload+on+Your+Local+Machine&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and started like this:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;numactl --physcpubind=12,13,14,15 -i 0 ./build/install/bin/mongod --replSet rs0 --port 50000 --bind_ip localhost&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Benchmark query was executed using benchrun.py for 1 thread and for 32 threads:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;numactl --physcpubind=1,2,3 -i 0 python2 benchrun.py --shell ../mongo/build/install/bin/mongo -t THREAD_COUNT --trialCount 5 --port 50000 --replset rs0 -f testcases/huge_projection_pipeline.js --includeFilter aggregation&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;The results are summarized in the table. Each value is ops/second returned by benchrun.py.&lt;/p&gt;
&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;&#160;&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;SORT =&amp;gt; SKIP =&amp;gt; PROJECT&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;PROJECT =&amp;gt; SORT =&amp;gt; SKIP&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Regression&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1 thread&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0.12494183772023579&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0.11548743612955885&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;-8.18%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;32 threads&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0.015050143297231916&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0.013868785258024836&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;-8.52%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;What do you think?&lt;/p&gt;</comment>
                            <comment id="3380631" author="JIRAUSER1255444" created="Tue, 8 Sep 2020 19:00:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt;&#160;&#160;PROJECT =&amp;gt; SORT =&amp;gt; SKIP was always chosen, without any conditions. Thank you for idea with&#160;&#160;$_internalInhibitOptimization!&lt;/p&gt;</comment>
                            <comment id="3380382" author="charlie.swanson" created="Tue, 8 Sep 2020 17:31:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=nikita.lapkov&quot; class=&quot;user-hover&quot; rel=&quot;nikita.lapkov&quot;&gt;nikita.lapkov&lt;/a&gt;in your most recent performance test did you &lt;em&gt;always&lt;/em&gt; prefer PROJECT =&amp;gt; SORT =&amp;gt; SKIP, or only when the projection is simple, as implied in your previous comment? &lt;/p&gt;

&lt;p&gt;As a workaround for the tests, you could add an &lt;a href=&quot;https://github.com/mongodb/mongo/blob/04b12743cbdcfea11b339e6ad21fc24dec8f6539/src/mongo/db/pipeline/document_source_internal_inhibit_optimization.h#L37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$_internalInhibitOptimization stage&lt;/a&gt; in addition to the final $skip.&lt;/p&gt;</comment>
                            <comment id="3380220" author="JIRAUSER1255444" created="Tue, 8 Sep 2020 16:42:18 +0000"  >&lt;p&gt;I have ran performance test for patch where PROJECT =&amp;gt; SORT =&amp;gt; SKIP is always preferred over SORT =&amp;gt; SKIP =&amp;gt; PROJECT (&lt;a href=&quot;https://evergreen.mongodb.com/version/5f566916e3c3312467c49518&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Evergreen&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;No regressions were detected. Some improvements were found (&lt;a href=&quot;https://evergreen.mongodb.com/task/performance_linux_wt_standalone_views_aggregation_patch_3af444c081fea53ab85073211aa04064d399a898_5f566916e3c3312467c49518_20_09_07_17_10_53#/%23comparehashes=3af444c081fea53ab85073211aa04064d399a898&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.IdentityView.Empty=MAX&amp;amp;selected.Aggregation.IdentityView.GeoNear2d=MAX&amp;amp;selected.Aggregation.IdentityView.GeoNear2dSphere=MAX&amp;amp;selected.Aggregation.IdentityView.Group.All=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroups=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroupsWithAvg=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroupsWithSumJs=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroupsWithAvgJs=MAX&amp;amp;selected.Aggregation.IdentityView.Group.OneFieldReferencedOutOfMany=MAX&amp;amp;selected.Aggregation.IdentityView.Limit=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.Pipeline=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArray=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArray.Pipeline=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArrayOfObject=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArrayOfObject.Pipeline=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedJoin=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedJoin.NoCache=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedPrefixJoin=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedPrefixJoin.NoCache=MAX&amp;amp;selected.Aggregation.IdentityView.LookupViaGraphLookup=MAX&amp;amp;selected.Aggregation.IdentityView.LookupOrders=MAX&amp;amp;selected.Aggregation.IdentityView.GraphLookupSocialite=MAX&amp;amp;selected.Aggregation.IdentityView.GraphLookupNeighbors=MAX&amp;amp;selected.Aggregation.IdentityView.Match=MAX&amp;amp;selected.Aggregation.IdentityView.MatchOneFieldFromBigDocument=MAX&amp;amp;selected.Aggregation.IdentityView.MatchManyFieldsFromBigDocument=MAX&amp;amp;selected.Aggregation.IdentityView.Project=MAX&amp;amp;selected.Aggregation.IdentityView.ExpressionObject=MAX&amp;amp;selected.Aggregation.IdentityView.Redact=MAX&amp;amp;selected.Aggregation.IdentityView.Sample.SmallSample=MAX&amp;amp;selected.Aggregation.IdentityView.Sample.LargeSample=MAX&amp;amp;selected.Aggregation.IdentityView.Skip=MAX&amp;amp;selected.Aggregation.IdentityView.Sort=MAX&amp;amp;selected.Aggregation.IdentityView.Unwind=MAX&amp;amp;selected.Aggregation.IdentityView.SortWithLimit=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenGroup=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenMatch=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenSort=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenSkip=MAX&amp;amp;selected.Aggregation.IdentityView.CountsFullCollection=MAX&amp;amp;selected.Aggregation.IdentityView.CountsIntIDRange=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithIndex=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithIndexAndQuery=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithoutIndex=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithoutIndexAndQuery=MAX&amp;amp;selected.Aggregation.IdentityView.SortByComputedField=MAX&amp;amp;selected.Aggregation.IdentityView.SortProjectWithBigDocuments=MAX&amp;amp;selected.Aggregation.IdentityView.SortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.IdentityView.IndexedSortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareToInt=MAX&amp;amp;selected.Aggregation.IdentityView.Function.SimpleNested.FieldPathInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.SimpleNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Eq.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Eq.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Gt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Gt.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Lt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Lt.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.Mixed=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ComplexNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.Basic=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.MultiLevelNoIndex=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ComplexNested.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ReallyBigNestedComparison.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.MultiLevelWithIndex=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ReallyBigNestedComparison.FieldPathInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.BlockingStage=MAX#comparehashes=3af444c081fea53ab85073211aa04064d399a898&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.IdentityView.Empty=MAX&amp;amp;selected.Aggregation.IdentityView.GeoNear2d=MAX&amp;amp;selected.Aggregation.IdentityView.GeoNear2dSphere=MAX&amp;amp;selected.Aggregation.IdentityView.Group.All=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroups=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroupsWithAvg=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroupsWithSumJs=MAX&amp;amp;selected.Aggregation.IdentityView.Group.TenGroupsWithAvgJs=MAX&amp;amp;selected.Aggregation.IdentityView.Group.OneFieldReferencedOutOfMany=MAX&amp;amp;selected.Aggregation.IdentityView.Limit=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.Pipeline=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArray=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArray.Pipeline=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArrayOfObject=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.LocalArrayOfObject.Pipeline=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedJoin=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedJoin.NoCache=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedPrefixJoin=MAX&amp;amp;selected.Aggregation.IdentityView.Lookup.UncorrelatedPrefixJoin.NoCache=MAX&amp;amp;selected.Aggregation.IdentityView.LookupViaGraphLookup=MAX&amp;amp;selected.Aggregation.IdentityView.LookupOrders=MAX&amp;amp;selected.Aggregation.IdentityView.GraphLookupSocialite=MAX&amp;amp;selected.Aggregation.IdentityView.GraphLookupNeighbors=MAX&amp;amp;selected.Aggregation.IdentityView.Match=MAX&amp;amp;selected.Aggregation.IdentityView.MatchOneFieldFromBigDocument=MAX&amp;amp;selected.Aggregation.IdentityView.MatchManyFieldsFromBigDocument=MAX&amp;amp;selected.Aggregation.IdentityView.Project=MAX&amp;amp;selected.Aggregation.IdentityView.ExpressionObject=MAX&amp;amp;selected.Aggregation.IdentityView.Redact=MAX&amp;amp;selected.Aggregation.IdentityView.Sample.SmallSample=MAX&amp;amp;selected.Aggregation.IdentityView.Sample.LargeSample=MAX&amp;amp;selected.Aggregation.IdentityView.Skip=MAX&amp;amp;selected.Aggregation.IdentityView.Sort=MAX&amp;amp;selected.Aggregation.IdentityView.Unwind=MAX&amp;amp;selected.Aggregation.IdentityView.SortWithLimit=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenGroup=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenMatch=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenSort=MAX&amp;amp;selected.Aggregation.IdentityView.UnwindThenSkip=MAX&amp;amp;selected.Aggregation.IdentityView.CountsFullCollection=MAX&amp;amp;selected.Aggregation.IdentityView.CountsIntIDRange=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithIndex=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithIndexAndQuery=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithoutIndex=MAX&amp;amp;selected.Aggregation.IdentityView.DistinctWithoutIndexAndQuery=MAX&amp;amp;selected.Aggregation.IdentityView.SortByComputedField=MAX&amp;amp;selected.Aggregation.IdentityView.SortProjectWithBigDocuments=MAX&amp;amp;selected.Aggregation.IdentityView.SortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.IdentityView.IndexedSortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareToInt=MAX&amp;amp;selected.Aggregation.IdentityView.Function.SimpleNested.FieldPathInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.SimpleNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Eq.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Eq.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Gt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Gt.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Lt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.CompareFields.Lt.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.Mixed=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ComplexNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.Basic=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.MultiLevelNoIndex=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ComplexNested.TwoArgs=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ReallyBigNestedComparison.CurrentInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.MultiLevelWithIndex=MAX&amp;amp;selected.Aggregation.IdentityView.Function.ReallyBigNestedComparison.FieldPathInArgs=MAX&amp;amp;selected.Aggregation.IdentityView.UnionWith.BlockingStage=MAX&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;one&lt;/a&gt;, &lt;a href=&quot;https://evergreen.mongodb.com/task/performance_linux_wt_standalone_javascript_patch_3af444c081fea53ab85073211aa04064d399a898_5f566916e3c3312467c49518_20_09_07_17_10_53#/%23comparehashes=3af444c081fea53ab85073211aa04064d399a898&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.Group.TenGroupsWithSumJs=MAX&amp;amp;selected.Aggregation.Group.TenGroupsWithAvgJs=MAX&amp;amp;selected.Aggregation.Function.CompareToInt=MAX&amp;amp;selected.Aggregation.Function.SimpleNested.FieldPathInArgs=MAX&amp;amp;selected.Aggregation.Function.SimpleNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Eq.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Eq.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Gt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Gt.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Lt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Lt.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.Mixed=MAX&amp;amp;selected.Aggregation.Function.ComplexNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.ComplexNested.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.ReallyBigNestedComparison.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.ReallyBigNestedComparison.FieldPathInArgs=MAX#comparehashes=3af444c081fea53ab85073211aa04064d399a898&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.Group.TenGroupsWithSumJs=MAX&amp;amp;selected.Aggregation.Group.TenGroupsWithAvgJs=MAX&amp;amp;selected.Aggregation.Function.CompareToInt=MAX&amp;amp;selected.Aggregation.Function.SimpleNested.FieldPathInArgs=MAX&amp;amp;selected.Aggregation.Function.SimpleNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Eq.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Eq.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Gt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Gt.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Lt.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.CompareFields.Lt.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.Mixed=MAX&amp;amp;selected.Aggregation.Function.ComplexNested.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.ComplexNested.TwoArgs=MAX&amp;amp;selected.Aggregation.Function.ReallyBigNestedComparison.CurrentInArgs=MAX&amp;amp;selected.Aggregation.Function.ReallyBigNestedComparison.FieldPathInArgs=MAX&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;two&lt;/a&gt;, &lt;a href=&quot;https://evergreen.mongodb.com/task/performance_linux_wt_standalone_aggregation_patch_3af444c081fea53ab85073211aa04064d399a898_5f566916e3c3312467c49518_20_09_07_17_10_53#/%23comparehashes=3af444c081fea53ab85073211aa04064d399a898&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.Empty=MAX&amp;amp;selected.Aggregation.GeoNear2d=MAX&amp;amp;selected.Aggregation.GeoNear2dSphere=MAX&amp;amp;selected.Aggregation.Group.All=MAX&amp;amp;selected.Aggregation.Group.TenGroups=MAX&amp;amp;selected.Aggregation.Group.TenGroupsWithAvg=MAX&amp;amp;selected.Aggregation.Group.OneFieldReferencedOutOfMany=MAX&amp;amp;selected.Aggregation.Limit=MAX&amp;amp;selected.Aggregation.Lookup=MAX&amp;amp;selected.Aggregation.Lookup.Pipeline=MAX&amp;amp;selected.Aggregation.Lookup.LocalArray=MAX&amp;amp;selected.Aggregation.Lookup.LocalArray.Pipeline=MAX&amp;amp;selected.Aggregation.Lookup.LocalArrayOfObject=MAX&amp;amp;selected.Aggregation.Lookup.LocalArrayOfObject.Pipeline=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedJoin=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedJoin.NoCache=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedPrefixJoin=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedPrefixJoin.NoCache=MAX&amp;amp;selected.Aggregation.LookupViaGraphLookup=MAX&amp;amp;selected.Aggregation.LookupOrders=MAX&amp;amp;selected.Aggregation.GraphLookupSocialite=MAX&amp;amp;selected.Aggregation.GraphLookupNeighbors=MAX&amp;amp;selected.Aggregation.Match=MAX&amp;amp;selected.Aggregation.MatchOneFieldFromBigDocument=MAX&amp;amp;selected.Aggregation.MatchManyFieldsFromBigDocument=MAX&amp;amp;selected.Aggregation.Project=MAX&amp;amp;selected.Aggregation.ExpressionObject=MAX&amp;amp;selected.Aggregation.Redact=MAX&amp;amp;selected.Aggregation.Sample.SmallSample=MAX&amp;amp;selected.Aggregation.Sample.LargeSample=MAX&amp;amp;selected.Aggregation.Skip=MAX&amp;amp;selected.Aggregation.Sort=MAX&amp;amp;selected.Aggregation.Unwind=MAX&amp;amp;selected.Aggregation.SortWithLimit=MAX&amp;amp;selected.Aggregation.UnwindThenGroup=MAX&amp;amp;selected.Aggregation.UnwindThenMatch=MAX&amp;amp;selected.Aggregation.UnwindThenSort=MAX&amp;amp;selected.Aggregation.UnwindThenSkip=MAX&amp;amp;selected.Aggregation.SortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.IndexedSortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.UnionWith.Basic=MAX&amp;amp;selected.Aggregation.UnionWith.MultiLevelNoIndex=MAX&amp;amp;selected.Aggregation.UnionWith.MultiLevelWithIndex=MAX&amp;amp;selected.Aggregation.UnionWith.BlockingStage=MAX#comparehashes=3af444c081fea53ab85073211aa04064d399a898&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.Empty=MAX&amp;amp;selected.Aggregation.GeoNear2d=MAX&amp;amp;selected.Aggregation.GeoNear2dSphere=MAX&amp;amp;selected.Aggregation.Group.All=MAX&amp;amp;selected.Aggregation.Group.TenGroups=MAX&amp;amp;selected.Aggregation.Group.TenGroupsWithAvg=MAX&amp;amp;selected.Aggregation.Group.OneFieldReferencedOutOfMany=MAX&amp;amp;selected.Aggregation.Limit=MAX&amp;amp;selected.Aggregation.Lookup=MAX&amp;amp;selected.Aggregation.Lookup.Pipeline=MAX&amp;amp;selected.Aggregation.Lookup.LocalArray=MAX&amp;amp;selected.Aggregation.Lookup.LocalArray.Pipeline=MAX&amp;amp;selected.Aggregation.Lookup.LocalArrayOfObject=MAX&amp;amp;selected.Aggregation.Lookup.LocalArrayOfObject.Pipeline=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedJoin=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedJoin.NoCache=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedPrefixJoin=MAX&amp;amp;selected.Aggregation.Lookup.UncorrelatedPrefixJoin.NoCache=MAX&amp;amp;selected.Aggregation.LookupViaGraphLookup=MAX&amp;amp;selected.Aggregation.LookupOrders=MAX&amp;amp;selected.Aggregation.GraphLookupSocialite=MAX&amp;amp;selected.Aggregation.GraphLookupNeighbors=MAX&amp;amp;selected.Aggregation.Match=MAX&amp;amp;selected.Aggregation.MatchOneFieldFromBigDocument=MAX&amp;amp;selected.Aggregation.MatchManyFieldsFromBigDocument=MAX&amp;amp;selected.Aggregation.Project=MAX&amp;amp;selected.Aggregation.ExpressionObject=MAX&amp;amp;selected.Aggregation.Redact=MAX&amp;amp;selected.Aggregation.Sample.SmallSample=MAX&amp;amp;selected.Aggregation.Sample.LargeSample=MAX&amp;amp;selected.Aggregation.Skip=MAX&amp;amp;selected.Aggregation.Sort=MAX&amp;amp;selected.Aggregation.Unwind=MAX&amp;amp;selected.Aggregation.SortWithLimit=MAX&amp;amp;selected.Aggregation.UnwindThenGroup=MAX&amp;amp;selected.Aggregation.UnwindThenMatch=MAX&amp;amp;selected.Aggregation.UnwindThenSort=MAX&amp;amp;selected.Aggregation.UnwindThenSkip=MAX&amp;amp;selected.Aggregation.SortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.IndexedSortGroupWithBigDocuments=MAX&amp;amp;selected.Aggregation.UnionWith.Basic=MAX&amp;amp;selected.Aggregation.UnionWith.MultiLevelNoIndex=MAX&amp;amp;selected.Aggregation.UnionWith.MultiLevelWithIndex=MAX&amp;amp;selected.Aggregation.UnionWith.BlockingStage=MAX&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;three&lt;/a&gt;). As mentioned above, most likely the cause is that pipeline did not get any input.&lt;/p&gt;</comment>
                            <comment id="3374843" author="JIRAUSER1255444" created="Thu, 3 Sep 2020 15:14:27 +0000"  >&lt;p&gt;I have re-applied the original patch and sent it for performance testing again. Unfortunately, it crashed on one of the workloads. To fix this, I have made a small fix described below.&lt;/p&gt;

&lt;p&gt;To perform $skip pushdown to the query stage we build structure called LimitThenSkip. It represents operation &quot;limit X documents and skip Y after it&quot;. This structure is extracted in method DocumentSourceSort::extractSkipAndLimitForPushdown, src/mongo/db/pipeline/document_source_sort.cpp.&lt;/p&gt;

&lt;p&gt;On certain queries computed skip value was greater than limit. Basically we were asking to skip more documents than the limit stage returned to us. This cause the invariant in function attemptToGetExecutor, src/mongo/db/pipeline/pipeline_d.cpp to fail.&lt;/p&gt;

&lt;p&gt;To fix it, I have capped the skip value with limit value. Basically it means that we can skip the desired amount of documents but no more than the limit stage returned to us.&lt;/p&gt;

&lt;p&gt;Now the patch passes the performance test, but the regression described above is still in place (see Aggregation.SortProjectWithBigDocuments in &lt;a href=&quot;https://evergreen.mongodb.com/task/performance_linux_wt_standalone_agg_query_comparison_patch_5154eca6d3a3489d7cc537453cb8672524242085_5f4f8467e3c3314587996294_20_09_02_11_39_41##comparehashes=5154eca6d3a3489d7cc537453cb8672524242085&amp;amp;threads=maxonly&amp;amp;selected.Aggregation.CountsFullCollection=MAX&amp;amp;selected.Aggregation.CountsIntIDRange=MAX&amp;amp;selected.Aggregation.DistinctWithIndex=MAX&amp;amp;selected.Aggregation.DistinctWithIndexAndQuery=MAX&amp;amp;selected.Aggregation.DistinctWithoutIndex=MAX&amp;amp;selected.Aggregation.DistinctWithoutIndexAndQuery=MAX&amp;amp;selected.Aggregation.SortByComputedField=MAX&amp;amp;selected.Aggregation.SortProjectWithBigDocuments=MAX&amp;amp;selected.Aggregation.Empty=MAX&amp;amp;selected.Aggregation.NoMatch=MAX&amp;amp;selected.Aggregation.IntIdFindOne=MAX&amp;amp;selected.Aggregation.IntNonIdFindOne=MAX&amp;amp;selected.Aggregation.IntIDRange=MAX&amp;amp;selected.Aggregation.RegexPrefixFindOne=MAX&amp;amp;selected.Aggregation.TwoInts=MAX&amp;amp;selected.Aggregation.StringUnindexedInPredWithNonSimpleCollation=MAX&amp;amp;selected.Aggregation.StringUnindexedInPredWithSimpleCollation=MAX&amp;amp;selected.Aggregation.UnindexedLargeInMatching=MAX&amp;amp;selected.Aggregation.UnindexedLargeInUnsortedMatching=MAX&amp;amp;selected.Aggregation.UnindexedVeryLargeInSortedMatching=MAX&amp;amp;selected.Aggregation.UnindexedVeryLargeInUnsortedMatching=MAX&amp;amp;selected.Aggregation.UnindexedLargeInNonMatching=MAX&amp;amp;selected.Aggregation.UnindexedLargeInUnsortedNonMatching=MAX&amp;amp;selected.Aggregation.IntNonIdFindOneProjectionCovered=MAX&amp;amp;selected.Aggregation.IntNonIdFindOneProjection=MAX&amp;amp;selected.Aggregation.IntNonIdFindProjectionCovered=MAX&amp;amp;selected.Aggregation.FindProjection=MAX&amp;amp;selected.Aggregation.FindWideDocProjection=MAX&amp;amp;selected.Aggregation.FindProjectionThreeFieldsCovered=MAX&amp;amp;selected.Aggregation.FindProjectionThreeFields=MAX&amp;amp;selected.Aggregation.FindProjectionDottedField=MAX&amp;amp;selected.Aggregation.FindProjectionDottedField.Indexed=MAX&amp;amp;selected.Aggregation.SortByArrayOfScalars=MAX&amp;amp;selected.Aggregation.SortByArrayOfNestedDocuments=MAX&amp;amp;selected.Aggregation.CoveredNonBlockingSort=MAX&amp;amp;selected.Aggregation.CoveredBlockingSort=MAX&amp;amp;selected.Aggregation.NonCoveredBlockingSortWithIndexToSupportSort=MAX&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this run&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;As &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.storch&quot; class=&quot;user-hover&quot; rel=&quot;david.storch&quot;&gt;david.storch&lt;/a&gt; pointed out, it is not obvious if we should always choose PROJECT =&amp;gt; SORT =&amp;gt; SKIP over SORT =&amp;gt; SKIP =&amp;gt; PROJECT. Now we always do SORT =&amp;gt; SKIP =&amp;gt; PROJECT which kills the performance on benchmark because big documents are sent to the SORT.&lt;/p&gt;

&lt;p&gt;My suggestion is to prefer PROJECT =&amp;gt; SORT =&amp;gt; SKIP plan when the PROJECT is &lt;a href=&quot;https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/projection.h#L118&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;simple&lt;/a&gt;. This will fix the regression and seems to be sane assumption. What are your thoughts about that?&lt;/p&gt;

&lt;p&gt;BTW, if this patch is to be merged into master, mongo-perf workloads will need to be refreshed. As &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt;&#160; said, currently some workloads &lt;a href=&quot;https://github.com/mongodb/mongo-perf/blob/master/testcases/pipelines.js#L125&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;add $skip&lt;/a&gt; to the end of aggregation pipeline to prevent BSON serialisation. With the patch applied this skip is going to be pushed down to the query stage and nothing will be returned to pipeline to process.&lt;/p&gt;</comment>
                            <comment id="2735881" author="david.storch" created="Thu, 16 Jan 2020 20:42:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt;, to answer your question more directly, pushdown of the &lt;tt&gt;$skip&lt;/tt&gt; inhibits the optimization from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15200&quot; title=&quot;Query planner should move projection stage below sort stage when possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15200&quot;&gt;&lt;del&gt;SERVER-15200&lt;/del&gt;&lt;/a&gt; because we currently add the SKIP PlanStage to the tree prior to the projection. See this planner analysis code:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/bb6e5391a9591139804038b3524a1b92ad1c327b/src/mongo/db/query/planner_analysis.cpp#L862-L890&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/bb6e5391a9591139804038b3524a1b92ad1c327b/src/mongo/db/query/planner_analysis.cpp#L862-L890&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project-sort swapping optimization from &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15200&quot; title=&quot;Query planner should move projection stage below sort stage when possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15200&quot;&gt;&lt;del&gt;SERVER-15200&lt;/del&gt;&lt;/a&gt; only kicks in if the tree has a very particular structure, where the projection is directly above the sort. The presence of the skip node causes us to bail out of the optimization. As Ian said, it&apos;s probably a good idea to skip before projecting, to avoid computing the projection over documents that are eventually skipped. It&apos;s not obvious &lt;em&gt;a priori&lt;/em&gt; whether the plan should be PROJECT =&amp;gt; SORT =&amp;gt; SKIP or SORT =&amp;gt; SKIP =&amp;gt; PROJECT. Currently, we choose the latter.&lt;/p&gt;</comment>
                            <comment id="2723080" author="ian.boros" created="Mon, 13 Jan 2020 21:33:02 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I could imagine that for cases where the projection is expensive to compute, pushing it beneath the skip means that it will be applied to documents that ultimately get skipped. We had to think about this for Top-K sort during &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15200&quot; title=&quot;Query planner should move projection stage below sort stage when possible&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15200&quot;&gt;&lt;del&gt;SERVER-15200&lt;/del&gt;&lt;/a&gt; (similar case) and intentionally did not apply the optimization.&lt;/p&gt;

&lt;p&gt;That said, I could see a case for pushing the projection beneath the skip -&amp;gt; sort -&amp;gt; sortkey gen as long as the projection does not contain computed fields (which could cause the document to get bigger).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10520">
                    <name>Problem/Incident</name>
                                            <outwardlinks description="causes">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="924519">SERVER-43297</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10220">
                    <name>Tested</name>
                                            <outwardlinks description="tested by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="277934" name="huge_projection_pipeline.js" size="4254962" author="nikita.lapkov@mongodb.com" created="Fri, 11 Sep 2020 09:29:37 +0000"/>
                            <attachment id="277935" name="sample_document.json" size="177419" author="nikita.lapkov@mongodb.com" created="Fri, 11 Sep 2020 09:29:35 +0000"/>
                            <attachment id="242720" name="skip_push_down.patch" size="34348" author="charlie.swanson@mongodb.com" created="Mon, 13 Jan 2020 20:25:13 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000nECI4QAO, 5002K00000pGOitQAG]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 13 Jan 2020 20:33:45 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 18 weeks, 1 day 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-1751</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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 18 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_16465" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Linked BF Score</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>ian.boros@mongodb.com</customfieldvalue>
            <customfieldvalue>nikita.lapkov@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|huwmxj:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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="3614">Query 2020-09-07</customfieldvalue>
    <customfieldvalue id="3615">Query 2020-09-21</customfieldvalue>
    <customfieldvalue id="3616">Query 2020-10-05</customfieldvalue>
    <customfieldvalue id="3617">Query 2020-10-19</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|huw96v:</customfieldvalue>

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