<?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 Splunk Join Optimisation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537602#M151999</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the below query which does the search on two different sources in the same index and join the results based app correlation id to get results and perform the stats operation. However, the source files are huge and hence the join is taking too longs to get me the results.&lt;/P&gt;&lt;P&gt;index=server sourcetype=perfromance source="*performance.log"&amp;nbsp; component_role=consumer&amp;nbsp;&lt;/P&gt;&lt;P&gt;| join&amp;nbsp; app_id [ search&amp;nbsp;index=server sourcetype=component source="*component.log" | rename appCorId as app_id ]&lt;/P&gt;&lt;P&gt;| stats count(eval=(process_result="COMPLETED")) as Completed&amp;nbsp;count(eval=(process_result="FAILED")) as Failed&lt;/P&gt;&lt;P&gt;This is a simple join but taking huge time when do a search for 24 hours.&lt;/P&gt;&lt;P&gt;Please help optimize this query.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 11:43:42 GMT</pubDate>
    <dc:creator>deepuhassan</dc:creator>
    <dc:date>2021-01-28T11:43:42Z</dc:date>
    <item>
      <title>Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537602#M151999</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the below query which does the search on two different sources in the same index and join the results based app correlation id to get results and perform the stats operation. However, the source files are huge and hence the join is taking too longs to get me the results.&lt;/P&gt;&lt;P&gt;index=server sourcetype=perfromance source="*performance.log"&amp;nbsp; component_role=consumer&amp;nbsp;&lt;/P&gt;&lt;P&gt;| join&amp;nbsp; app_id [ search&amp;nbsp;index=server sourcetype=component source="*component.log" | rename appCorId as app_id ]&lt;/P&gt;&lt;P&gt;| stats count(eval=(process_result="COMPLETED")) as Completed&amp;nbsp;count(eval=(process_result="FAILED")) as Failed&lt;/P&gt;&lt;P&gt;This is a simple join but taking huge time when do a search for 24 hours.&lt;/P&gt;&lt;P&gt;Please help optimize this query.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 11:43:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537602#M151999</guid>
      <dc:creator>deepuhassan</dc:creator>
      <dc:date>2021-01-28T11:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537606#M152001</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=server (sourcetype=perfromance source="*performance.log" component_role=consumer ) OR (sourcetype=component source="*component.log")
| eval app_id=coalesce(appCorId,app_id)
| stats count(eval=(process_result="COMPLETED")) as Completed count(eval(process_result="FAILED")) as Failed dc(source) as flag by app_id
| where flag &amp;gt; 1
| stats sum(Completed) as Completed sum(Failed) as Failed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 12:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537606#M152001</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-28T12:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537752#M152037</link>
      <description>&lt;P&gt;Thanks.. It is partially working.&lt;/P&gt;&lt;P&gt;However, would you please explain how the steps you have taken to form the query?&lt;/P&gt;&lt;P&gt;What shall I do if the field name used for correlation is same in both the sources?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 23:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537752#M152037</guid>
      <dc:creator>deepuhassan</dc:creator>
      <dc:date>2021-01-28T23:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537753#M152038</link>
      <description>&lt;P&gt;I have tried using the technique you have given me for the below query but it is not working. The below query will be used to calculate the time difference of an event logged in 2 different sources which has common correlation id. Since I am using join it is taking longer time.&lt;/P&gt;&lt;P&gt;Basically I am trying to find out the end to end time involved for a message which started from Kafka producer and processed by a consumer.&lt;/P&gt;&lt;P&gt;index=server sourcetype="performance"&amp;nbsp; source="*/performance.log" perf_component_role=kafkaProducer component_name="test-api-v1" event_status=COMPLETE &amp;nbsp;| eval publishedtime=_time&lt;BR /&gt;| join app_correlation_id [search index=server component_name="test-api-v2" environment=sit1 "Process updated Successfully !!" | eval processedtime=_time]&lt;BR /&gt;| eval endToEndTime = (processedtime -publishedtime) | table app_correlation_id publishedtime processedtime endToEndTime&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 23:39:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537753#M152038</guid>
      <dc:creator>deepuhassan</dc:creator>
      <dc:date>2021-01-28T23:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537770#M152042</link>
      <description>&lt;P&gt;However, would you please explain how the steps you have taken to form the query?&lt;/P&gt;&lt;P&gt;&lt;A href="https://conf.splunk.com/files/2019/slides/FNC2751.pdf" target="_blank"&gt;-&amp;gt;https://conf.splunk.com/files/2019/slides/FNC2751.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Please see here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What shall I do if the field name used for correlation is same in both the sources?&lt;/P&gt;&lt;P&gt;-&amp;gt; remove eval with coalesce&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 02:28:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537770#M152042</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-29T02:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537776#M152046</link>
      <description>&lt;P&gt;Thanks for the document.&lt;/P&gt;&lt;P&gt;I am not able to optimize the below query :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=server sourcetype="performance"&amp;nbsp; source="*/performance.log" perf_component_role=kafkaProducer component_name="test-api-v1" event_status=COMPLETE &amp;nbsp;| eval publishedtime=_time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| join app_correlation_id [search index=server component_name="test-api-v2" environment=sit1 "Process updated Successfully !!" | eval processedtime=_time]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval endToEndTime = (processedtime -publishedtime) | table app_correlation_id publishedtime processedtime endToEndTime&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 03:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537776#M152046</guid>
      <dc:creator>deepuhassan</dc:creator>
      <dc:date>2021-01-29T03:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Join Optimisation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537777#M152047</link>
      <description>&lt;P&gt;&lt;STRONG&gt;stats range() by&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;app_correlation_id&lt;/STRONG&gt;&amp;nbsp; is useful. you can do it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 03:50:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Join-Optimisation/m-p/537777#M152047</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-29T03:50:12Z</dc:date>
    </item>
  </channel>
</rss>

