<?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 get a daily count of distinct users over a large time range without re-running from beginning of time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-daily-count-of-distinct-users-over-a-large-time/m-p/60449#M180133</link>
    <description>&lt;P&gt;The best way would be to use sistats and a summary, or alternatively, use report acceleration. With report acceleration, just set up your search and tell Splunk to accelerate, and that should do it.&lt;/P&gt;

&lt;P&gt;If you summarize yourself, then on a daily basis (and you can backfill later), you run a;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | sistats dc(user) by x,y,z 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and store that to a summary. Then to get your counts:&lt;/P&gt;

&lt;P&gt;index=my_summary_index name=my_summary_job | stats dc(user)&lt;/P&gt;

&lt;P&gt;(or &lt;CODE&gt;... | stats dc(user) by x,y,z&lt;/CODE&gt; or &lt;CODE&gt;... | stats dc(user) by x,y&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;the sistats command will have saved the right data, and the stats command will know how to handle what sistats did. Yes, it is doing slightly clever things under the hood.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:30:32 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2020-09-28T13:30:32Z</dc:date>
    <item>
      <title>How to get a daily count of distinct users over a large time range without re-running from beginning of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-daily-count-of-distinct-users-over-a-large-time/m-p/60448#M180132</link>
      <description>&lt;P&gt;I have a simple "| stats dc()" command to get a cumulative sum of distinct users; however, I don't want to have to run this query from the beginning of time every day it runs for performance reasons.&lt;/P&gt;

&lt;P&gt;These couple routes came to mind, but don't seem best...&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Summary indexes can
write out the distinct users per
day, but seems like couldn't compute
distinct over the whole set of days.&lt;/LI&gt;
&lt;LI&gt;Write the distinct values to
    lookup and only adding the new
    values each day -- a kinda hacky incremental approach.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Any ideas on the optimal solution?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2013 17:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-daily-count-of-distinct-users-over-a-large-time/m-p/60448#M180132</guid>
      <dc:creator>e_sherlock</dc:creator>
      <dc:date>2013-03-13T17:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a daily count of distinct users over a large time range without re-running from beginning of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-daily-count-of-distinct-users-over-a-large-time/m-p/60449#M180133</link>
      <description>&lt;P&gt;The best way would be to use sistats and a summary, or alternatively, use report acceleration. With report acceleration, just set up your search and tell Splunk to accelerate, and that should do it.&lt;/P&gt;

&lt;P&gt;If you summarize yourself, then on a daily basis (and you can backfill later), you run a;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | sistats dc(user) by x,y,z 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and store that to a summary. Then to get your counts:&lt;/P&gt;

&lt;P&gt;index=my_summary_index name=my_summary_job | stats dc(user)&lt;/P&gt;

&lt;P&gt;(or &lt;CODE&gt;... | stats dc(user) by x,y,z&lt;/CODE&gt; or &lt;CODE&gt;... | stats dc(user) by x,y&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;the sistats command will have saved the right data, and the stats command will know how to handle what sistats did. Yes, it is doing slightly clever things under the hood.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:30:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-daily-count-of-distinct-users-over-a-large-time/m-p/60449#M180133</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2020-09-28T13:30:32Z</dc:date>
    </item>
  </channel>
</rss>

