<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:53:04 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-83757] [CQF] Remember chunk boundaries for the duration of the query</title>
                <link>https://jira.mongodb.org/browse/SERVER-83757</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We can remember the chunk starting points and keep them consistent for the duration of the query in the hope that this will achieve greater degree of stability and repeatability of the sampling process. Before we issue any sampling queries, we issue a &#8220;chunk collection&#8221; query. Using the example above, this query will return 5 record ids. We will then store those in a vector. We&#8217;ll modify the sampling query above to effectively replace the PhysicalScan with Limit 5 with a ValueScan node which will sequentially return record ids. The rest of the sampling plan remains unchanged.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2513301">SERVER-83757</key>
            <summary>[CQF] Remember chunk boundaries for the duration of the query</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="david.percy@mongodb.com">David Percy</assignee>
                                    <reporter username="svilen.mihaylov@mongodb.com">Svilen Mihaylov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 30 Nov 2023 20:35:24 +0000</created>
                <updated>Thu, 18 Jan 2024 23:04:05 +0000</updated>
                            <resolved>Thu, 18 Jan 2024 23:04:05 +0000</resolved>
                                                    <fixVersion>7.3.0-rc0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="6023907" author="xgen-internal-githook" created="Thu, 18 Jan 2024 20:56:51 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;David Percy&apos;, &apos;email&apos;: &apos;david.percy@mongodb.com&apos;, &apos;username&apos;: &apos;dpercy&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83757&quot; title=&quot;[CQF] Remember chunk boundaries for the duration of the query&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83757&quot;&gt;&lt;del&gt;SERVER-83757&lt;/del&gt;&lt;/a&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;CQF&amp;#93;&lt;/span&gt; Draw one sample to estimate all predicates in a query&lt;/p&gt;

&lt;p&gt;When a query has multiple predicates, and the sampling CE method is&lt;br/&gt;
used, we run a sampling query for each predicate separately. The&lt;br/&gt;
sampling query is responsible for both 1. choosing a random sample of&lt;br/&gt;
documents 2. counting the fraction of sampled documents that match&lt;br/&gt;
the predicate.&lt;/p&gt;

&lt;p&gt;Using a separate sample for each predicate can lead to &quot;contradictory&quot;&lt;br/&gt;
estimates. For example, you could estimate that &lt;/p&gt;
{c: &quot;US&quot;, s: &quot;NY&quot;}
&lt;p&gt;matches more documents than &lt;/p&gt;
{c: &quot;US&quot;}
&lt;p&gt; &amp;#8211; this is a bad estimate because&lt;br/&gt;
adding the &lt;/p&gt;
{s: &quot;NY&quot;}
&lt;p&gt; filter cannot possibly &lt;b&gt;increase&lt;/b&gt; the number of&lt;br/&gt;
matching documents.&lt;/p&gt;

&lt;p&gt;This commit prevents these contradictory estimates by (conceptually)&lt;br/&gt;
drawing a single sample and reusing it for all predicates in the query.&lt;/p&gt;

&lt;p&gt;Physically, we materialize only a handful of record IDs: one per chunk,&lt;br/&gt;
controlled by &apos;internalCascadesOptimizerSampleChunks&apos;.&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: 36b07d142f0cf65d4b554160d67e152c64964262&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/94862ff496e352fe1c15aced7a42a128fd01860b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/94862ff496e352fe1c15aced7a42a128fd01860b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="6023905" author="xgen-internal-githook" created="Thu, 18 Jan 2024 20:56:29 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;David Percy&apos;, &apos;email&apos;: &apos;david.percy@mongodb.com&apos;, &apos;username&apos;: &apos;dpercy&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-83757&quot; title=&quot;[CQF] Remember chunk boundaries for the duration of the query&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-83757&quot;&gt;&lt;del&gt;SERVER-83757&lt;/del&gt;&lt;/a&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;CQF&amp;#93;&lt;/span&gt; Add missing properties in sampling ImplementationVisitor.&lt;/p&gt;

&lt;p&gt;In a previous ticket &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-81589&quot; title=&quot;[CQF] Avoid optimizer round-trip for lowering of SargableNode for sampling queries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-81589&quot;&gt;&lt;del&gt;SERVER-81589&lt;/del&gt;&lt;/a&gt; we introduced this&lt;br/&gt;
ImplementationVisitor to avoid using OptPhaseManager for sampling&lt;br/&gt;
queries. It&apos;s responsible for producing a physical plan, and associated&lt;br/&gt;
properties in _propsMap. However we were missing a map entry for the&lt;br/&gt;
LimitSkipNode.&lt;/p&gt;

&lt;p&gt;GitOrigin-RevId: bd0a5cdba6720cac56d60b4f5848ac13166789df&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/ba9c9d09055eb5a0b07b12c0755e9d6ce5dc43d9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/ba9c9d09055eb5a0b07b12c0755e9d6ce5dc43d9&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_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_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 20 Dec 2023 21:38:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 weeks, 6 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_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-3119</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>david.percy@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>david.percy@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>svilen.mihaylov@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i32oc7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i2kgu4:</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_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="7262">QO 2023-12-11</customfieldvalue>
    <customfieldvalue id="7263">QO 2023-12-25</customfieldvalue>
    <customfieldvalue id="8044">QO 2024-01-08</customfieldvalue>
    <customfieldvalue id="8112">QO 2024-01-22</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|i32ahj:</customfieldvalue>

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