<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:50:32 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-60715] Access of array fields is slow in SBE queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-60715</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Summary: accessing an array field is ~15-30% slower in SBE compared to the classical engine.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Create a collection that contains 10^6 documents like:&lt;/p&gt;

{ scalar: Random.randInt(10), array: [Random.randInt(10), Random.randInt(10), Random.randInt(10)], &#160;}

&lt;p&gt;Let the collection have namespace of &quot;sbe-perf.LS&quot;. From mongo shell run against the collection two benchmarks:&lt;br/&gt;
 &#160;&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;   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;{{benchRun({parallel: &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;1&lt;/span&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;, seconds: &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;5&lt;/span&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;, ops: [{op:&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;find&quot;&lt;/span&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;, ns:&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;sbe-perf.LS&quot;&lt;/span&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;, query:&#160;{scalar:&lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;7&lt;/span&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;}, readCmd: &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;true&lt;/span&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;results:&lt;br/&gt;
 &quot;queryLatencyAverageMicros&quot; : 434161.6666666667,&lt;br/&gt;
 &quot;totalOps&quot; : NumberLong(12), &lt;br/&gt;
 &quot;totalOps/s&quot; : 2.3032541141876615,&lt;br/&gt;
 &#160;&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;   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;benchRun({parallel: &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;1&lt;/span&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;, seconds: &lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;5&lt;/span&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;, ops: [{op:&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;find&quot;&lt;/span&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;, ns:&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;sbe-perf.LS&quot;&lt;/span&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;, query: {array:&lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;7&lt;/span&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;}, readCmd: &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;true&lt;/span&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;results:&lt;br/&gt;
 &quot;queryLatencyAverageMicros&quot; : 872580.1666666666,&lt;br/&gt;
 &quot;totalOps&quot; : NumberLong(6), &lt;br/&gt;
 &quot;totalOps/s&quot; : 1.1460142483951503,&lt;/p&gt;

&lt;p&gt;The second benchRun is twice as slow. While we do expect the array access to be slower, the drop in SBE is much bigger than in the classic engine. For the classic engine the numbers are respectively:&lt;/p&gt;

&lt;p&gt;&quot;queryLatencyAverageMicros&quot; : 419583.25,&lt;br/&gt;
 &quot;totalOps&quot; : NumberLong(12), &lt;br/&gt;
 &quot;totalOps/s&quot; : 2.3832732351265875,&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;&quot;queryLatencyAverageMicros&quot; : 657760,&lt;br/&gt;
 &quot;totalOps&quot; : NumberLong(8), &lt;br/&gt;
 &quot;totalOps/s&quot; : 1.5202920024849174,&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The top 10 consumers of CPU in SBE&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Scalar&lt;/b&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160; 15.99%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::vm::ByteCode::runInternal&lt;/tt&gt;&lt;br/&gt;
 {{ +&#160;&#160;&#160; 8.10%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_txn_read_upd_list_internal}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 7.47%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_btcur_next_prefix}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 4.92%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::ProjectStage::getNext}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 4.08%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::WiredTigerRecordStoreCursorBase::next}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 3.70%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_cursor_get_valuev}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 3.42%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::vm::ByteCode::run}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 3.38%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::ScanStage::getNext}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 3.34%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __unpack_read}}&lt;br/&gt;
 {{ +&#160;&#160;&#160; 3.03%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_cursor_get_keyv}}&lt;/p&gt;

&lt;p&gt;&#160;&lt;br/&gt;
 &lt;b&gt;Array&lt;/b&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160; 21.13%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::vm::ByteCode::runInternal&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 5.97%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::vm::ByteCode::run&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 4.49%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::ProjectStage::getNext&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 4.44%&#160; libc-2.27.so&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __strlen_avx2&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 4.32%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::TraverseStage::traverse&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 4.27%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_btcur_next_prefix&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 3.93%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_txn_read_upd_list_internal&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 2.40%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::sbe::vm::ByteCode::getField&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 2.28%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; __wt_cursor_get_valuev&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;+&#160;&#160;&#160; 2.02%&#160; mongod&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;span class=&quot;error&quot;&gt;&amp;#91;.&amp;#93;&lt;/span&gt; mongo::WiredTigerRecordStoreCursorBase::next&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Flame graphs are attached.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1898719">SERVER-60715</key>
            <summary>Access of array fields is slow in SBE queries</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13203">Gone away</resolution>
                                        <assignee username="mihai.andrei@mongodb.com">Mihai Andrei</assignee>
                                    <reporter username="irina.yatsenko@mongodb.com">Irina Yatsenko</reporter>
                        <labels>
                            <label>pm2697-m3</label>
                            <label>sbe</label>
                    </labels>
                <created>Thu, 14 Oct 2021 19:12:02 +0000</created>
                <updated>Fri, 27 Oct 2023 20:45:53 +0000</updated>
                            <resolved>Mon, 26 Sep 2022 15:01:40 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="4855645" author="david.storch" created="Mon, 26 Sep 2022 15:20:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mihai.andrei%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;mihai.andrei@mongodb.com&quot;&gt;mihai.andrei@mongodb.com&lt;/a&gt; do we have a benchmark like this running in Evergreen anywhere? We have &lt;tt&gt;Queries.WildcardIndex.PointQueryOnSingleArrayField*&lt;/tt&gt; which tests array traversal, but I&apos;m not sure that we have a simple test with a sizeable data set that intends to emphasize array traversal. Are you aware of any pre-existing test like this? If not, I&apos;m not sure which line item in the design document would cover the addition of this new benchmark.&lt;/p&gt;</comment>
                            <comment id="4855600" author="kyle.suarez" created="Mon, 26 Sep 2022 15:09:04 +0000"  >&lt;p&gt;Nice work &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=martin.neupauer%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;martin.neupauer@mongodb.com&quot;&gt;martin.neupauer@mongodb.com&lt;/a&gt;; I&apos;m gonna mark this as being fixed by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-60718&quot; title=&quot;Access of sub-fields is slow in SBE queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-60718&quot;&gt;&lt;del&gt;SERVER-60718&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="4846500" author="kyle.suarez" created="Wed, 21 Sep 2022 20:23:55 +0000"  >&lt;p&gt;Assigning to &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mihai.andrei%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;mihai.andrei@mongodb.com&quot;&gt;mihai.andrei@mongodb.com&lt;/a&gt; to confirm we&apos;ve made progress here. If there&apos;s still a regression &amp;#8211; at the risk of building up the &quot;hype train&quot; &amp;#8211; please try applying Martin&apos;s patch?&lt;/p&gt;</comment>
                            <comment id="4280701" author="JIRAUSER1259274" created="Fri, 7 Jan 2022 16:42:41 +0000"  >&lt;p&gt;The plan for a single field point query (whether the field is an array or not):&lt;br/&gt;
&amp;gt; db.arrays.find(&lt;/p&gt;
{a16:17}
&lt;p&gt;).explain().queryPlanner.winningPlan.slotBasedPlan.stages&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; filter &lt;/p&gt;
{fillEmpty (s8, false)}
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; traverse s8 s7 s6 &lt;span class=&quot;error&quot;&gt;&amp;#91;s4, s5&amp;#93;&lt;/span&gt; &lt;/p&gt;
{s8 || s7}
&lt;p&gt; &lt;/p&gt;
{s8}
&lt;p&gt;from&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; project &lt;span class=&quot;error&quot;&gt;&amp;#91;s6 = getField (s4, &amp;quot;a16&amp;quot;)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; scan s4 s5 none none none none [] @&quot;1b70f805-2a10-4957-88a5-01b559d5c1a5&quot; true false&lt;br/&gt;
in&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; project &lt;span class=&quot;error&quot;&gt;&amp;#91;s7 = fillEmpty (s6 == 17, false)&amp;#93;&lt;/span&gt;&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; limit 1&lt;br/&gt;
    &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; coscan&lt;/p&gt;</comment>
                            <comment id="4202051" author="JIRAUSER1259274" created="Fri, 19 Nov 2021 23:26:31 +0000"  >&lt;p&gt;Collected hardware perf counters for accessing array fields in a dataset with 10^6 records, where each record has the following schema:&#160;&lt;/p&gt;
{a0: int, a1: [int], a4:[int, int, int, int], a8:[8 ints], a16:[16 ints]}
&lt;p&gt;. The integers are randomly generated in the range [0;10) with a query like find({x:17}), where &quot;x&quot; is one of the aN field. By the choice of values, the query returns no results and has to travers all arrays in an aN field fully. No indexes used.&lt;/p&gt;

&lt;p&gt;611.75 msec task-clock # 0.186 CPUs utilized &lt;br/&gt;
 178 context-switches # 0.291 K/sec &lt;br/&gt;
 0 cpu-migrations # 0.000 K/sec &lt;br/&gt;
 0 page-faults # 0.000 K/sec &lt;br/&gt;
 1,739,733,925 cycles # 2.844 GHz &lt;br/&gt;
 3,612,625,207 instructions # 2.08 insn per cycle &lt;br/&gt;
 693,236,064 branches # 1133.209 M/sec &lt;br/&gt;
 813,732 branch-misses # 0.12% of all branches&lt;/p&gt;

&lt;p&gt;708.39 msec task-clock # 0.230 CPUs utilized &lt;br/&gt;
 188 context-switches # 0.265 K/sec &lt;br/&gt;
 0 cpu-migrations # 0.000 K/sec &lt;br/&gt;
 0 page-faults # 0.000 K/sec &lt;br/&gt;
 2,095,617,912 cycles # 2.958 GHz &lt;br/&gt;
 4,384,588,252 instructions # 2.09 insn per cycle &lt;br/&gt;
 851,208,796 branches # 1201.619 M/sec &lt;br/&gt;
 1,136,682 branch-misses # 0.13% of all branches&lt;/p&gt;

&lt;p&gt;1,234.99 msec task-clock # 0.342 CPUs utilized &lt;br/&gt;
 298 context-switches # 0.241 K/sec &lt;br/&gt;
 0 cpu-migrations # 0.000 K/sec &lt;br/&gt;
 0 page-faults # 0.000 K/sec &lt;br/&gt;
 3,762,001,254 cycles # 3.046 GHz &lt;br/&gt;
 8,883,850,249 instructions # 2.36 insn per cycle &lt;br/&gt;
 1,705,220,567 branches # 1380.757 M/sec &lt;br/&gt;
 5,253,857 branch-misses # 0.31% of all branches&lt;/p&gt;

&lt;p&gt;1,894.53 msec task-clock # 0.409 CPUs utilized &lt;br/&gt;
 451 context-switches # 0.238 K/sec &lt;br/&gt;
 0 cpu-migrations # 0.000 K/sec &lt;br/&gt;
 1 page-faults # 0.001 K/sec &lt;br/&gt;
 5,846,699,734 cycles # 3.086 GHz &lt;br/&gt;
 14,827,692,021 instructions # 2.54 insn per cycle &lt;br/&gt;
 2,833,922,808 branches # 1495.848 M/sec &lt;br/&gt;
 9,336,111 branch-misses # 0.33% of all branches&lt;/p&gt;

&lt;p&gt;4,076.74 msec task-clock # 0.586 CPUs utilized &lt;br/&gt;
 945 context-switches # 0.232 K/sec &lt;br/&gt;
 0 cpu-migrations # 0.000 K/sec &lt;br/&gt;
 0 page-faults # 0.000 K/sec &lt;br/&gt;
 10,593,588,736 cycles # 2.599 GHz &lt;br/&gt;
 26,444,206,767 instructions # 2.50 insn per cycle &lt;br/&gt;
 5,022,740,663 branches # 1232.048 M/sec &lt;br/&gt;
 18,697,474 branch-misses # 0.37% of all branches&lt;/p&gt;

&lt;p&gt;The stats show a linear dependency of the number of instructions on the size of the array at ~1450 instructions per element. Measuring the same queries in classic engine yields similar IPC values for all array numbers but much lower overall instruction counts (for 16-elements array seeing ~9,296M instructions overall compared to 26,444M in SBE). The dependency of the number of instructions on the size of array in classical engine is also linear but at ~320 instructions per element.&lt;/p&gt;

&lt;p&gt;Given the flamegraphs, I believe most of the overhead in the SBE engine is due to the VM.&lt;/p&gt;</comment>
                            <comment id="4142355" author="kyle.suarez" created="Fri, 22 Oct 2021 15:50:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ethan.zhang&quot; class=&quot;user-hover&quot; rel=&quot;ethan.zhang&quot;&gt;ethan.zhang&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=eric.cox&quot; class=&quot;user-hover&quot; rel=&quot;eric.cox&quot;&gt;eric.cox&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=irina.yatsenko&quot; class=&quot;user-hover&quot; rel=&quot;irina.yatsenko&quot;&gt;irina.yatsenko&lt;/a&gt;, we are sending these SBE performance issues to the $group epic. Let us know if you think it belongs in a separate project.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="1898747">SERVER-60718</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2046404">SERVER-66457</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="340531" name="sbe-point-array.svg" size="120587" author="irina.yatsenko@mongodb.com" created="Thu, 14 Oct 2021 19:20:33 +0000"/>
                            <attachment id="340532" name="sbe-point-scalar.svg" size="114529" author="irina.yatsenko@mongodb.com" created="Thu, 14 Oct 2021 19:20:33 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 22 Oct 2021 15:50:50 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 19 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-60718'>SERVER-60718</a></s>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-2697</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>
                            1 year, 19 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>irina.yatsenko@mongodb.com</customfieldvalue>
            <customfieldvalue>kyle.suarez@mongodb.com</customfieldvalue>
            <customfieldvalue>mihai.andrei@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i05saf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2lnz:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5912">QE 2022-10-03</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</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|i05efr:</customfieldvalue>

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