<?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 How do I optimize the performance of this search with appendcols? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274324#M82750</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Can any one help with fine tuning this search? It's taking a long time to load.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=me sourcetype=access_apache | stats avg(responsemili) as "Avg Response" |eval "Avg Response"=round('Avg Response',2) | appendcols maxtime=600 [ search index=me sourcetype=access_apache NOT clientip = 172.* NOT clientip = 10.* | stats avg(responsemili) as "Avg Response(Internet)" | eval "Avg Response(Internet)"=round('Avg Response(Internet)',2)] | appendcols maxtime=600 [ search index=me sourcetype=access_apache clientip = 172.* OR clientip = 10.* | stats avg(responsemili) as "Avg Response(Intranet)"|eval "Avg Response(Intranet)"=round('Avg Response(Intranet)',2)]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 08 Dec 2015 06:14:56 GMT</pubDate>
    <dc:creator>vranjith009</dc:creator>
    <dc:date>2015-12-08T06:14:56Z</dc:date>
    <item>
      <title>How do I optimize the performance of this search with appendcols?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274324#M82750</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Can any one help with fine tuning this search? It's taking a long time to load.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=me sourcetype=access_apache | stats avg(responsemili) as "Avg Response" |eval "Avg Response"=round('Avg Response',2) | appendcols maxtime=600 [ search index=me sourcetype=access_apache NOT clientip = 172.* NOT clientip = 10.* | stats avg(responsemili) as "Avg Response(Internet)" | eval "Avg Response(Internet)"=round('Avg Response(Internet)',2)] | appendcols maxtime=600 [ search index=me sourcetype=access_apache clientip = 172.* OR clientip = 10.* | stats avg(responsemili) as "Avg Response(Intranet)"|eval "Avg Response(Intranet)"=round('Avg Response(Intranet)',2)]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Dec 2015 06:14:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274324#M82750</guid>
      <dc:creator>vranjith009</dc:creator>
      <dc:date>2015-12-08T06:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I optimize the performance of this search with appendcols?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274325#M82751</link>
      <description>&lt;P&gt;I would use stats with eval instead of appendcols, something like below. You will have to adjust the conditions and syntax inside if or use match but the skeleton should be something similar&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=me sourcetype=access_apache 
|stats avg(eval(if(clientip != 172. AND clientip != 10.),responsemili)) as Avg Response(Internet)",
avg(eval(if(clientip = 172. OR clientip = 10.),responsemili)) as Avg Response(Intranet)",
avg(responsemili) as "Avg Response"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reference : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1/Search/Usestatswithevalexpressionsandfunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.1/Search/Usestatswithevalexpressionsandfunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 08:40:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274325#M82751</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2015-12-08T08:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I optimize the performance of this search with appendcols?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274326#M82752</link>
      <description>&lt;P&gt;let me know if it helps&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 04:01:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274326#M82752</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2015-12-09T04:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I optimize the performance of this search with appendcols?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274327#M82753</link>
      <description>&lt;P&gt;Its not renjith.&lt;/P&gt;

&lt;P&gt;I hope "stats avg(eval(if(clientip != 172. AND clientip != 10.),responsemili))"  NOT function is not taking with eval&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 10:39:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274327#M82753</guid>
      <dc:creator>vranjith009</dc:creator>
      <dc:date>2015-12-11T10:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I optimize the performance of this search with appendcols?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274328#M82754</link>
      <description>&lt;P&gt;See if this works&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=me sourcetype=access_apache | eval inter=if((clientip!=172. AND clientip != 10.), responsemili, "")  | eval intra=if((clientip=172. AND clientip = 10.),responsemili, "") | stats avg(responsemili) as "Avg Response" avg(inter) as "Avg Response(Internet)",  avg(intra) as "Avg Response(Intranet)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Dec 2015 12:58:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-optimize-the-performance-of-this-search-with-appendcols/m-p/274328#M82754</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-12-11T12:58:59Z</dc:date>
    </item>
  </channel>
</rss>

