<?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 What are base search recommendations? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/620984#M50969</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I have noticed that some users in our Splunk environment are always using base searches and Post-process searches, because they was told that was a good practice to do that.&lt;/P&gt;
&lt;P&gt;But there are some cases I have noticed that the use of the base search is not speeding up the dashboard instead spent more time.&lt;/P&gt;
&lt;P&gt;For example there is a dashboard that uses a base search and they use something like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Base search&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;index=example sourcetype=testing | fields *&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then at the subsearch I can see that when Splunk uses that best search is doing something weird adding the&lt;FONT face="courier new,courier"&gt; | fields *&lt;/FONT&gt;&amp;nbsp; at search for example:&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;index=example sourcetype=testing &lt;STRONG&gt;&lt;FONT color="#FF9900"&gt;| fields *&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| eval Date=strftime(_time, "%m/%d/%Y")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| dedup s1, s1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF9900"&gt;| fields *&lt;/FONT&gt; &lt;/STRONG&gt;| search something=tosearch&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF9900"&gt;| fields *&lt;/FONT&gt;&lt;/STRONG&gt; | eval _time = strptime(Date,"%m/%d/%Y")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;When the post-search is&lt;/P&gt;
&lt;P&gt;&amp;lt;query&amp;gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| eval Date=strftime(_time, "%m/%d/%Y")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| dedup s1, s1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| search something=tosearch&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| eval _time = strptime(Date,"%m/%d/%Y")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would like to understand why Splunk does it.&lt;/P&gt;
&lt;P&gt;And also I would like to know if there are some scenarios where use the base search is not recommended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advantage.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2022 07:17:57 GMT</pubDate>
    <dc:creator>glpadilla_sol</dc:creator>
    <dc:date>2022-11-16T07:17:57Z</dc:date>
    <item>
      <title>What are base search recommendations?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/620984#M50969</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I have noticed that some users in our Splunk environment are always using base searches and Post-process searches, because they was told that was a good practice to do that.&lt;/P&gt;
&lt;P&gt;But there are some cases I have noticed that the use of the base search is not speeding up the dashboard instead spent more time.&lt;/P&gt;
&lt;P&gt;For example there is a dashboard that uses a base search and they use something like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Base search&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;index=example sourcetype=testing | fields *&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then at the subsearch I can see that when Splunk uses that best search is doing something weird adding the&lt;FONT face="courier new,courier"&gt; | fields *&lt;/FONT&gt;&amp;nbsp; at search for example:&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;index=example sourcetype=testing &lt;STRONG&gt;&lt;FONT color="#FF9900"&gt;| fields *&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| eval Date=strftime(_time, "%m/%d/%Y")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| dedup s1, s1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF9900"&gt;| fields *&lt;/FONT&gt; &lt;/STRONG&gt;| search something=tosearch&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#FF9900"&gt;| fields *&lt;/FONT&gt;&lt;/STRONG&gt; | eval _time = strptime(Date,"%m/%d/%Y")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;When the post-search is&lt;/P&gt;
&lt;P&gt;&amp;lt;query&amp;gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| eval Date=strftime(_time, "%m/%d/%Y")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| dedup s1, s1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| search something=tosearch&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;| eval _time = strptime(Date,"%m/%d/%Y")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/query&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would like to understand why Splunk does it.&lt;/P&gt;
&lt;P&gt;And also I would like to know if there are some scenarios where use the base search is not recommended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advantage.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 07:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/620984#M50969</guid>
      <dc:creator>glpadilla_sol</dc:creator>
      <dc:date>2022-11-16T07:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: What are base search recommendations?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/621018#M50982</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241395"&gt;@glpadilla_sol&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;base search should contain a streming command to reduce the number of results and then use results in panels.&lt;/P&gt;&lt;P&gt;Infact using fields at the end of the base search os a workaround when there isn't any streaming command.&lt;/P&gt;&lt;P&gt;Running a search like the one you shared, you don't have the advantages of a base search because you have all the results and all the fields.&lt;/P&gt;&lt;P&gt;And you don't reduce the CPU occupation becsuse you have a&amp;nbsp; search with all the results in each panel.&lt;/P&gt;&lt;P&gt;So I use base searches when I can group or filter results.&lt;/P&gt;&lt;P&gt;If your problem are performaces in dashboard running there are other methods to do this (accelerations, Summary Indexes, Data Models, etc...)&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 07:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/621018#M50982</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-16T07:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: What are base search recommendations?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/621022#M50983</link>
      <description>&lt;P&gt;Base searches are really intended to reuse aggregations rather than just bring a whole load of data into the dashboard like your example here.&lt;/P&gt;&lt;P&gt;Unless you use an aggregation there is a 500,000 event limit I believe and I have found some strange bad performance behaviour when trying to do this.&lt;/P&gt;&lt;P&gt;You should craft base searches carefully, considering how they can be used. Without seeing the other searches, it's hard to say whether your example makes sense as a base search.&lt;/P&gt;&lt;P&gt;As to why you are seeing those extra fields * statements, I can't say.&lt;/P&gt;&lt;P&gt;So, as a recommendation - using base searches just to try to 'cache' events, is bad practice, I've rarely found a good need for that&lt;/P&gt;&lt;P&gt;For example, if you have two searches, one needing count by host and the other needing count by sourcetype, then a sensible base search would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=x
| stats count by host sourcetype&lt;/LI-CODE&gt;&lt;P&gt;and the appropriate post-process searches would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sum(count) as count by host

AND

| stats sum(count) as count by sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 07:54:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/What-are-base-search-recommendations/m-p/621022#M50983</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-11-16T07:54:57Z</dc:date>
    </item>
  </channel>
</rss>

