<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Join or Subsearch performance in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-or-Subsearch-performance/m-p/427793#M122463</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have a performance question about "join" and "subsearch".&lt;BR /&gt;
Even join is a ressource-guzzler command I saw that sometimes it works better than a subsearch:&lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Query A =&amp;gt;  index=my_index [search index=other_one earliest=-1d@d|fields field1 |dedup field1|table field1]
Query B =&amp;gt; index=my_index |join type=inner max=1 field1 [search index=other_index earliest=-1d@d |fields field1 |dedup field1|table field1]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in "my_index" I have about 20 millions of datas. in "other_index" + earliest=-1d@d I have about 80 000 datas.  In this case the query A is faster than query B.&lt;BR /&gt;
But if i have more than 300 000 datas in "other_index" + earliest=-1d@d, then query B is faster query A.&lt;/P&gt;

&lt;P&gt;Does anyone have an explanation?&lt;/P&gt;

&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:36:41 GMT</pubDate>
    <dc:creator>MaryvonneMB</dc:creator>
    <dc:date>2020-09-29T23:36:41Z</dc:date>
    <item>
      <title>Join or Subsearch performance</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-or-Subsearch-performance/m-p/427793#M122463</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have a performance question about "join" and "subsearch".&lt;BR /&gt;
Even join is a ressource-guzzler command I saw that sometimes it works better than a subsearch:&lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Query A =&amp;gt;  index=my_index [search index=other_one earliest=-1d@d|fields field1 |dedup field1|table field1]
Query B =&amp;gt; index=my_index |join type=inner max=1 field1 [search index=other_index earliest=-1d@d |fields field1 |dedup field1|table field1]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in "my_index" I have about 20 millions of datas. in "other_index" + earliest=-1d@d I have about 80 000 datas.  In this case the query A is faster than query B.&lt;BR /&gt;
But if i have more than 300 000 datas in "other_index" + earliest=-1d@d, then query B is faster query A.&lt;/P&gt;

&lt;P&gt;Does anyone have an explanation?&lt;/P&gt;

&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-or-Subsearch-performance/m-p/427793#M122463</guid>
      <dc:creator>MaryvonneMB</dc:creator>
      <dc:date>2020-09-29T23:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Join or Subsearch performance</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-or-Subsearch-performance/m-p/427794#M122464</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Query A =&amp;gt;  earliest=-2d@d latest=-1d@d index=my_index [search index=other_one earliest=-1d@d|fields field1 |dedup field1|table field1]
 Query B =&amp;gt; earliest=-2d@d latest=-1d@d index=my_index |join type=inner max=1 field1 [search index=other_index earliest=-1d@d |fields field1 |dedup field1|table field1]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is there still a difference?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 17:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-or-Subsearch-performance/m-p/427794#M122464</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-03-15T17:41:32Z</dc:date>
    </item>
  </channel>
</rss>

