<?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 improve performance of stats sum in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474266#M133405</link>
    <description>&lt;P&gt;@bapun18 only possibility in the query seems like you can just delete &lt;CODE&gt;| search&lt;/CODE&gt; from your search so that filter for field &lt;CODE&gt;x-vf-trace-source&lt;/CODE&gt; can be applied while fetching data from index. Please try out and confirm!&lt;/P&gt;

&lt;P&gt;If the query performs for a day but not for multiple days, you can try using daily summary indexing.&lt;BR /&gt;
If you can have index extraction for field &lt;CODE&gt;x-vf-trace-source&lt;/CODE&gt; you can use tstats which would work way faster.&lt;BR /&gt;
If indexed extraction is not possible you can explore data model acceleration.&lt;/P&gt;

&lt;P&gt;Refer to documentation: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Aboutsummaryindexing"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Aboutsummaryindexing&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2019 16:20:46 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-11-01T16:20:46Z</dc:date>
    <item>
      <title>How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474258#M133397</link>
      <description>&lt;P&gt;Hi I want to improve my search for better search performance, please find the attachment enclosed.![alt text&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7891iD7394AAEEE972655/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 10:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474258#M133397</guid>
      <dc:creator>bapun18</dc:creator>
      <dc:date>2019-11-01T10:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474259#M133398</link>
      <description>&lt;P&gt;It would have been helpful to copy-and-paste the query into your question so we can test it ourselves.&lt;BR /&gt;
What about this query needs improving.  The screen shot does not show any performance information so we don't know what needs to change.&lt;BR /&gt;
Have you looked at the Job Inspector?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 11:47:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474259#M133398</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-11-01T11:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474260#M133399</link>
      <description>&lt;P&gt;seems like you are trying to calculate the size of each event and then sum them up to get total usage per day ...&lt;BR /&gt;
why not look at the &lt;CODE&gt;_internal&lt;/CODE&gt; index for license usage of this particular source in this particular index?&lt;/P&gt;

&lt;P&gt;there are tons of answers around this forum regarding license usage monitoring&lt;BR /&gt;
also, no need to do the &lt;CODE&gt;| search&lt;/CODE&gt; its redundant, just add all your filters &lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474260#M133399</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-11-01T12:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474261#M133400</link>
      <description>&lt;P&gt;Looking at the Events tab, it looks like you are in "Verbose Mode". Change your search from "Verbose Mode" to "Fast Mode" (on the bottom right of your search panel). That should speed things up&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7890iD6C6C7B36AFA5835/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Please mark as answer if this helps&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474261#M133400</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-01T12:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474262#M133401</link>
      <description>&lt;P&gt;He has a filter for a specific type of event. I would guess that's the reason he needs to calculate the size of each event. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474262#M133401</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-01T12:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474263#M133402</link>
      <description>&lt;P&gt;if he needs the size of each events, he wouldnt sum it up by time (1d)&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 12:46:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474263#M133402</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-11-01T12:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474264#M133403</link>
      <description>&lt;P&gt;Apologies for the confusion. Let me try to rephrase. It looks like they want to calculate the amount of data generated by a specific type of event by day. As far as I'm aware, License usage provides metrics at metadata level and does not provide metrics for a subset of the data within the index.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 14:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474264#M133403</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-01T14:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474265#M133404</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=myvdf_smapi_de_db sourcetype=smapi_collector_adnroid_myvf_de x-vf-trace-source="android:com.appseleration.android.selfcare"
|eval bytes=len(_raw)
|timechart span=1d sum(bytes) as Total_bytes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, You searched twice because of search in the second line. Let's remove this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |tstats sum(bytes) where index=myvdf_smapi_de_db sourcetype=smapi_collector_adnroid_myvf_de x-vf-trace-source="android:com.appseleration.android.selfcare"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Creating a data model so that this search can be used is one of the solutions.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/Knowledge/Designdatamodelobjects"&gt;Design data models&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 16:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474265#M133404</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-01T16:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve performance of stats sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474266#M133405</link>
      <description>&lt;P&gt;@bapun18 only possibility in the query seems like you can just delete &lt;CODE&gt;| search&lt;/CODE&gt; from your search so that filter for field &lt;CODE&gt;x-vf-trace-source&lt;/CODE&gt; can be applied while fetching data from index. Please try out and confirm!&lt;/P&gt;

&lt;P&gt;If the query performs for a day but not for multiple days, you can try using daily summary indexing.&lt;BR /&gt;
If you can have index extraction for field &lt;CODE&gt;x-vf-trace-source&lt;/CODE&gt; you can use tstats which would work way faster.&lt;BR /&gt;
If indexed extraction is not possible you can explore data model acceleration.&lt;/P&gt;

&lt;P&gt;Refer to documentation: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Aboutsummaryindexing"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Aboutsummaryindexing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 16:20:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-performance-of-stats-sum/m-p/474266#M133405</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-11-01T16:20:46Z</dc:date>
    </item>
  </channel>
</rss>

