<?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 increase the subsearch limit? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/553859#M157243</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;javiergn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can you maybe give some technical detail on why subsearches are expensive in terms of performance? Is the performance cost simply equal to doing that search on its own?&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 14:36:36 GMT</pubDate>
    <dc:creator>BernardEAI</dc:creator>
    <dc:date>2021-06-01T14:36:36Z</dc:date>
    <item>
      <title>How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244448#M72802</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to do a subsearch like this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index = raw_internet_cartonista programa = ILCL [ search index = raw_internet_cartonista programa = WNHC tipo = E | fields codigoAcesso ] | stats count by info10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I receive the message:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[subsearch]: Subsearch produced 12632 results, truncating to maxout 10000.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I configure my search to expand this limit? &lt;/P&gt;

&lt;P&gt;I've consulted the documentation and there are some parameters to set:&lt;/P&gt;

&lt;P&gt;[subsearch]  &lt;STRONG&gt;maxout&lt;/STRONG&gt; =  •      Maximum number of results to return from a subsearch. •             This number cannot be greater than or equal to 10500. •             Defaults to&lt;BR /&gt;
100. &lt;STRONG&gt;maxtime&lt;/STRONG&gt; =  •             Maximum number of seconds to run a subsearch before finalizing •          Defaults to 60. &lt;STRONG&gt;ttl&lt;/STRONG&gt; =  •      Time to cache a given subsearch's results. •             Defaults to&lt;BR /&gt;
300.&lt;/P&gt;

&lt;P&gt;Are these parameter correct? Where do I have to place these parameters? Which limits are most indicated?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Vitor&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 16:12:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244448#M72802</guid>
      <dc:creator>vitorvmiguel</dc:creator>
      <dc:date>2016-05-10T16:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244449#M72803</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = raw_internet_cartonista programa = ILCL [ search index = raw_internet_cartonista programa = WNHC tipo = E | stats values(codigoAcesso) AS codigoAcesso ] | stats count by info10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 May 2016 16:18:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244449#M72803</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-10T16:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244450#M72804</link>
      <description>&lt;P&gt;Short answer: do not use subsearches for this type of queries&lt;/P&gt;

&lt;P&gt;Detailed answer: subsearches are expensive in terms of performance and there's a limit for a reason. Do not increase this. You can normally find much better alternatives. Keep in mind your subsearch above is basically returning "codigoAcesso = value1 OR codigoAcesso = value2 OR .... OR codigoAcesso = value10000".&lt;/P&gt;

&lt;P&gt;First of all, what are you trying to achieve? I'm not 100% sure based on the search you are performing.&lt;/P&gt;

&lt;P&gt;If you just want both type of events do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = raw_internet_cartonista (programa = ILCL OR (programa = WNHC tipo = E))
| stats count by info10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you just want to display those matching both types of "programas" then you can try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = raw_internet_cartonista (programa = ILCL OR (programa = WNHC tipo = E))
| stats count, dc(programa) as distinct_count by info10
| where distinct_count &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 16:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244450#M72804</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-05-10T16:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244451#M72805</link>
      <description>&lt;P&gt;Thank you javiergn.&lt;/P&gt;

&lt;P&gt;I've seen across all the Splunk documentation the recomendation to not change the limits. And obviously there's a reason for that.&lt;/P&gt;

&lt;P&gt;My problem is to correlate events like:&lt;/P&gt;

&lt;P&gt;Event A: {time=10:01:000, program=ABC, logLevel=I, userAgent=iPhone, userID=00001}&lt;BR /&gt;
Event B: {time=10:02:000, program=DEF, logLevel=E, userAgent=, userID=00001}&lt;/P&gt;

&lt;P&gt;Imagine that i want to find who has errors on program=DEF and uses an iPhone, i have to correlate with a subsearch this two events, or there's a better way of doing that? The userAgent information in this example only appears in one single identification event.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=raw program=ABC AND logLevel=I [search index=raw program=DEF AND logLevel=E | fields userID ] | stats count by userAgent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you for helping me.&lt;BR /&gt;
Rgs.,&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 17:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244451#M72805</guid>
      <dc:creator>vitorvmiguel</dc:creator>
      <dc:date>2016-05-10T17:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244452#M72806</link>
      <description>&lt;P&gt;Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=raw (program=ABC AND logLevel=I) OR (program=DEF AND logLevel=E)
| stats values(logLevel) as logLevel, values(program) as program, values(userAgent) as userAgent by userID
| search program = ABC userAgent=iPhone
| table userID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 May 2016 08:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244452#M72806</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-05-11T08:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244453#M72807</link>
      <description>&lt;P&gt;It works!! Thank you very much javiergn!!&lt;/P&gt;

&lt;P&gt;One last question: If the events are in different indexes? How should i do?&lt;/P&gt;

&lt;P&gt;Event A: {index=raw_1, time=10:01:000, program=ABC, logLevel=I, userAgent=iPhone, userID=00001}&lt;BR /&gt;
Event B: {index=raw_2, time=10:02:000, program=DEF, logLevel=E, userAgent=, userID=00001}&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244453#M72807</guid>
      <dc:creator>vitorvmiguel</dc:creator>
      <dc:date>2020-09-29T09:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244454#M72808</link>
      <description>&lt;P&gt;Hi, apologies for the late reply.&lt;/P&gt;

&lt;P&gt;If the events are in different indexes you can still apply the same logic:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=index1 program=ABC logLevel=I) OR (index=index2 logLevel=E)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2016 12:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/244454#M72808</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-05-18T12:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/553859#M157243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;javiergn&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Can you maybe give some technical detail on why subsearches are expensive in terms of performance? Is the performance cost simply equal to doing that search on its own?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 14:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/553859#M157243</guid>
      <dc:creator>BernardEAI</dc:creator>
      <dc:date>2021-06-01T14:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to increase the subsearch limit?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/563927#M196435</link>
      <description>&lt;P&gt;But what if our subsearch has results more than 50000 and we need to those as well. As splunk subsearches has maxout 50000 whats the best way to optimize them? to increase the limit in limits.conf or is there any better way to do it by optimizing the query itself to allow the results for more than 50000.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Dave&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 10:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-increase-the-subsearch-limit/m-p/563927#M196435</guid>
      <dc:creator>datamine</dc:creator>
      <dc:date>2021-08-19T10:07:59Z</dc:date>
    </item>
  </channel>
</rss>

