<?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 Optimize a search without using join in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122900#M33162</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Hope you can give an solution to my concern.&lt;BR /&gt;
There were different sourcetypes under a single index and they have a similar field called BATCH_ID, "Sourcetype A" is coming from a database input (dump) and "Sourcetype B" is from a DB input (tail). is it possible to match UNIQUE values under sourcetype A with sourcetype B and exclude those that were not present in Sourcetype A under a single field without using "join"? &lt;/P&gt;

&lt;P&gt;My search below takes time to load results on the browser:&lt;BR /&gt;
index=AAA sourcetype="star_transaction_logs" BATCH_ID=* AGENCY_CODE=* EMPLOYEE_NO=* SERVICE_CODE=WHTLST SE_RESPCODE=0000 | join BATCH_ID AGENCY_CODE EMPLOYEE_NO [search index=AAA sourcetype=star_employees_history ACTION_TYPE=A BATCH_ID=* AGENCY_CODE=* EMPLOYEE_NO=* | join BRANCH_CODE [search index=mls_index sourcetype="star_branches_sourcetype" BRANCH_CODE=*] ] |dedup BATCH_ID | stats count(BATCH_ID) as COUNT by BRANCH_CODE BRANCH_NAME| addcoltotals label=Total labelfield=category COUNT | fields BRANCH_CODE BRANCH_NAME category COUNT | sort BRANCH_NAME&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:48:38 GMT</pubDate>
    <dc:creator>jonathan_yan5</dc:creator>
    <dc:date>2020-09-28T18:48:38Z</dc:date>
    <item>
      <title>Optimize a search without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122900#M33162</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Hope you can give an solution to my concern.&lt;BR /&gt;
There were different sourcetypes under a single index and they have a similar field called BATCH_ID, "Sourcetype A" is coming from a database input (dump) and "Sourcetype B" is from a DB input (tail). is it possible to match UNIQUE values under sourcetype A with sourcetype B and exclude those that were not present in Sourcetype A under a single field without using "join"? &lt;/P&gt;

&lt;P&gt;My search below takes time to load results on the browser:&lt;BR /&gt;
index=AAA sourcetype="star_transaction_logs" BATCH_ID=* AGENCY_CODE=* EMPLOYEE_NO=* SERVICE_CODE=WHTLST SE_RESPCODE=0000 | join BATCH_ID AGENCY_CODE EMPLOYEE_NO [search index=AAA sourcetype=star_employees_history ACTION_TYPE=A BATCH_ID=* AGENCY_CODE=* EMPLOYEE_NO=* | join BRANCH_CODE [search index=mls_index sourcetype="star_branches_sourcetype" BRANCH_CODE=*] ] |dedup BATCH_ID | stats count(BATCH_ID) as COUNT by BRANCH_CODE BRANCH_NAME| addcoltotals label=Total labelfield=category COUNT | fields BRANCH_CODE BRANCH_NAME category COUNT | sort BRANCH_NAME&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122900#M33162</guid>
      <dc:creator>jonathan_yan5</dc:creator>
      <dc:date>2020-09-28T18:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize a search without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122901#M33163</link>
      <description>&lt;P&gt;Hi jonathan_yan5,&lt;/P&gt;

&lt;P&gt;Sure it is possible, take a closer look at this answer &lt;A href="http://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;http://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt; to learn more about it.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2015 14:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122901#M33163</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-01-30T14:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize a search without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122902#M33164</link>
      <description>&lt;P&gt;Thanks MuS!.. it successfully matched a specific field with values on two different sourcetypes. Can you also give the search  wherein i could match values on 3 different fields existing on two different sourcetypes under a single query? Basically i should be able to match BATCH_ID, AGENCY_CODE and EMPLOYEE_NO on my report&lt;/P&gt;

&lt;P&gt;Sourcetype A&lt;BR /&gt;
Field BATCH_ID = ABC&lt;BR /&gt;
Field AGENCY_CODE = XYZ&lt;BR /&gt;
Field EMPLOYEE_NO = 123&lt;/P&gt;

&lt;P&gt;should match:&lt;/P&gt;

&lt;P&gt;Sourcetype B&lt;BR /&gt;
Field BATCH_ID = ABC&lt;BR /&gt;
Field AGENCY_CODE = XYZ&lt;BR /&gt;
Field EMPLOYEE_NO = 123&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:49:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Optimize-a-search-without-using-join/m-p/122902#M33164</guid>
      <dc:creator>jonathan_yan5</dc:creator>
      <dc:date>2020-09-28T18:49:00Z</dc:date>
    </item>
  </channel>
</rss>

