<?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 Re: How to optimize the given query without using join in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468638#M191932</link>
    <description>&lt;P&gt;Status is coming from index having values like completed, retain, progress l&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 12:59:24 GMT</pubDate>
    <dc:creator>avni26</dc:creator>
    <dc:date>2020-02-07T12:59:24Z</dc:date>
    <item>
      <title>How to optimize the given query without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468634#M191928</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to Optimize my  query to improve the dashboard performance without using any type of join function.&lt;/P&gt;

&lt;P&gt;Below is my query&lt;BR /&gt;
| inputlookup sample.csv&lt;BR /&gt;&lt;BR /&gt;
| search user IN ( &lt;EM&gt;) application_name IN (&lt;/EM&gt;) "application id" IN (*) &lt;BR /&gt;
|eval None="None"&lt;BR /&gt;
| table  "application id",application_name,user,"Status",Type,"Service Host",Platform,Jan,Feb,Mar,Apr,None,env&lt;BR /&gt;
| rename "application_name" as Server_Name&lt;BR /&gt;
| eval Server_Name=upper(Server_Name)&lt;BR /&gt;
| join type=left Server_Name &lt;BR /&gt;
    [ search index=idx sourcetype=xyz &lt;BR /&gt;
    | eval Server_Name=upper(Server_Name) &lt;BR /&gt;
    | search Status!="Completed"&lt;BR /&gt;
    | table Server_Name Status] &lt;BR /&gt;
    | search Status!="Completed" | stats sum("Jan") as jan sum("Feb") as feb sum("Mar") as mar sum("Apr") as apr by env&lt;BR /&gt;
    | eval total = jan+feb + mar + apr &lt;BR /&gt;
    |table env total&lt;/P&gt;

&lt;P&gt;Please help me to optimize this query without using join&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468634#M191928</guid>
      <dc:creator>avni26</dc:creator>
      <dc:date>2020-09-30T04:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize the given query without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468635#M191929</link>
      <description>&lt;P&gt;UPDATED:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx sourcetype=xyz Status="retain" OR Status="progress"  Server_Name=*
| eval Server_Name=upper(Server_Name) 
| table Server_Name Status
| dedup Server_Name
| lookup sample.csv "application_name" as Server_Name OUTPUTNEW 
| eval None="None" 
| where isnotnull(user) 
| search user IN ( ) application_name IN () "application id" IN (*) 
| stats sum("Jan") as jan sum("Feb") as feb sum("Mar") as mar sum("Apr") as apr by env 
| eval total = jan+feb + mar + apr 
| table env total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/187627"&gt;@avni26&lt;/a&gt; &lt;BR /&gt;
some code is disappear.&lt;EM&gt;Status&lt;/EM&gt; of &lt;EM&gt;Server_Name&lt;/EM&gt; is latest status.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:08:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468635#M191929</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-09-30T04:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize the given query without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468636#M191930</link>
      <description>&lt;P&gt;@to4kawa Thank you for your response.&lt;BR /&gt;
I tried to execute like above, but why  lookup fields giving multiple values in same row. &lt;/P&gt;

&lt;P&gt;thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 11:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468636#M191930</guid>
      <dc:creator>avni26</dc:creator>
      <dc:date>2020-02-07T11:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize the given query without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468637#M191931</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| lookup sample.csv "application_name" as Server_Name OUTPUTNEW 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Maybe, there is same Server_name.&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;| dedup Server_name&lt;/CODE&gt;&lt;BR /&gt;
but, &lt;EM&gt;Status&lt;/EM&gt; is unclear.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468637#M191931</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-09-30T04:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize the given query without using join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468638#M191932</link>
      <description>&lt;P&gt;Status is coming from index having values like completed, retain, progress l&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 12:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-optimize-the-given-query-without-using-join/m-p/468638#M191932</guid>
      <dc:creator>avni26</dc:creator>
      <dc:date>2020-02-07T12:59:24Z</dc:date>
    </item>
  </channel>
</rss>

