<?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: What alternatives can I use for my search instead of a subsearch to avoid performance issues? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265540#M79795</link>
    <description>&lt;P&gt;Sub searches are really expensive searches and they have limits; You can most likely replace it with a &lt;CODE&gt;stats&lt;/CODE&gt;, &lt;CODE&gt;streamstats&lt;/CODE&gt; or &lt;CODE&gt;eventstats&lt;/CODE&gt; search. Read more here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2016 13:55:02 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2016-02-03T13:55:02Z</dc:date>
    <item>
      <title>What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265534#M79789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am facing a subsearch performance problem. My goal is to have Bluecoat events filtered only to specific IP's coming from my firewall and having as a result the URL accessed by each IP.&lt;/P&gt;

&lt;P&gt;My search looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = bluecoat  [search index=checkpoint rule=rule1 OR rule=rule2 AND rule_uid=id1 OR rule_uid=id2 OR rule_uid=id3 OR rule_uid=id4 |fields src_ip | lookup dnslookup clienthost as src_ip output clientip as src_ip | dedup src_ip | table src_ip] | stats values(URL) by src_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I found a couple of alternative suggestions to use eventstats or similar to prevent the subsearch, but wasn't able to create it by myself. Can anyone help to point me to the right direction?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 12:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265534#M79789</guid>
      <dc:creator>kseidenschnur_s</dc:creator>
      <dc:date>2016-02-03T12:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265535#M79790</link>
      <description>&lt;P&gt;Hi! I was trying to reproduce your search in my Splunk system, but I don't understand what you want to do here:&lt;/P&gt;

&lt;P&gt;| lookup dnslookup clienthost as src_ip output clientip as src_ip | dedup src_ip | table src_ip&lt;/P&gt;

&lt;P&gt;Could you epxlain it please?&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:38:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265535#M79790</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2020-09-29T08:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265536#M79791</link>
      <description>&lt;P&gt;The checkpoint is only logging DNS names, therefore I am changing the DNS names into IP addresses and writing them into the same field. Since I can have multiple IP addresses I am doing a dedup and the use the result as the filter in the outer search.&lt;/P&gt;

&lt;P&gt;To get this clear, the search is running fine! But since the result of the inner search has about 900 IP adresses the whole search takes ages. I am looking for a way to get this running more efficient....&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 13:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265536#M79791</guid>
      <dc:creator>kseidenschnur_s</dc:creator>
      <dc:date>2016-02-03T13:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265537#M79792</link>
      <description>&lt;P&gt;I also discussed the possibility to have the inner search written into a lookup table on a regular base and then using the lookup table for the outer search. Should be much faster... But I was wondering if there is a better solution.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 13:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265537#M79792</guid>
      <dc:creator>kseidenschnur_s</dc:creator>
      <dc:date>2016-02-03T13:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265538#M79793</link>
      <description>&lt;P&gt;Maybe you can try to not doing a subsearch and just put thw two index with an OR condition&lt;/P&gt;

&lt;P&gt;index = bluecoat OR index=checkpoint rule=rule1 OR rule=rule2 AND rule_uid=id1 OR rule_uid=id2 OR rule_uid=id3 OR rule_uid=id4 | lookup dnslookup clienthost as src_ip output clientip as src_ip | dedup src_ip | stats values(URL) by src_ip&lt;/P&gt;

&lt;P&gt;I'm not sure about it, but just trying to give some useful ideas, maybe the inspiration will appear &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265538#M79793</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2020-09-29T08:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265539#M79794</link>
      <description>&lt;P&gt;Wow, I didn't read your second comment, let me try it on my system, maybe I can find something&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 13:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265539#M79794</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-02-03T13:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265540#M79795</link>
      <description>&lt;P&gt;Sub searches are really expensive searches and they have limits; You can most likely replace it with a &lt;CODE&gt;stats&lt;/CODE&gt;, &lt;CODE&gt;streamstats&lt;/CODE&gt; or &lt;CODE&gt;eventstats&lt;/CODE&gt; search. Read more here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html"&gt;https://answers.splunk.com/answers/129424/how-to-compare-fields-over-multiple-sourcetypes-without-join-append-or-use-of-subsearches.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 13:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265540#M79795</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-02-03T13:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265541#M79796</link>
      <description>&lt;P&gt;Actually I was trying things like that! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 13:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265541#M79796</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-02-03T13:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: What alternatives can I use for my search instead of a subsearch to avoid performance issues?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265542#M79797</link>
      <description>&lt;P&gt;Try something like,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = bluecoat  OR (index=checkpoint rule=rule1 OR rule=rule2 AND rule_uid=id1 OR rule_uid=id2 OR rule_uid=id3 OR rule_uid=id4)
|lookup dnslookup clienthost as src_ip output clientip as src_ip
|eval flag=if(index=="checkpoint ",1,0)|dedup index,src_ip,flag|eventstats count by src_ip|where count &amp;gt;1|stats values(URL) by src_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;Search both indexes Lookup clienthost   (assuming clienthost is only on   checkpoint) &lt;/LI&gt;
&lt;LI&gt;Set a flag to distinguish  between two indexes dedup based on  index ip and flag(this will make sure   that it deletes only duplicate ips  from respective indexes only)&lt;/LI&gt;
&lt;LI&gt;eventstats will find duplicates ie ;   common ips from both indexes &lt;/LI&gt;
&lt;LI&gt;Finally aggregate those values&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You might need to adjust based on your events&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 14:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-alternatives-can-I-use-for-my-search-instead-of-a-subsearch/m-p/265542#M79797</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-02-03T14:18:14Z</dc:date>
    </item>
  </channel>
</rss>

