<?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: count number of serialnumber with dc takes lots of time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439952#M171514</link>
    <description>&lt;P&gt;the rex is not the problem since im using it in lots of other queries&lt;/P&gt;

&lt;P&gt;how can i use summary ?&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2019 16:39:20 GMT</pubDate>
    <dc:creator>sarit_s</dc:creator>
    <dc:date>2019-05-06T16:39:20Z</dc:date>
    <item>
      <title>count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439946#M171508</link>
      <description>&lt;P&gt;hello&lt;BR /&gt;
i have this query :&lt;BR /&gt;
    index = amer_pj &lt;BR /&gt;
    | &lt;CODE&gt;SerialNumber&lt;/CODE&gt;&lt;BR /&gt;
    | &lt;CODE&gt;Region&lt;/CODE&gt;&lt;BR /&gt;
    | stats dc(SerialNumber) as SerialNumber by Region&lt;BR /&gt;
    | table SerialNumber&lt;/P&gt;

&lt;P&gt;which supposed to count the number of uniqe SerialNumbers &lt;BR /&gt;
for last 30 days it take more than an hour to complete the query &lt;BR /&gt;
what am i doing wrong ? is there a better way to do it ?&lt;BR /&gt;
is there a way to save the result of the last run ? &lt;BR /&gt;
(it is a dashboard, not a report)&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 14:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439946#M171508</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-05-06T14:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439947#M171509</link>
      <description>&lt;P&gt;How many events you have in 30 day time frame.You can summarize your data in a summary index over last 30 days and use the summary index in your report.&lt;/P&gt;

&lt;P&gt;Also try this query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=amer_pj| fields SerialNumber , Region | stats dc(SerialNumber) as SerialNumber by Region
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2019 14:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439947#M171509</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-05-06T14:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439948#M171510</link>
      <description>&lt;P&gt;What do those two macros do??&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 14:52:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439948#M171510</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-05-06T14:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439949#M171511</link>
      <description>&lt;P&gt;extract SerialNumber and Region from source&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 16:33:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439949#M171511</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-05-06T16:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439950#M171512</link>
      <description>&lt;P&gt;its still very slow.. &lt;/P&gt;

&lt;P&gt;i have millions of events in 30 days&lt;BR /&gt;
how can i use summary ?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 16:35:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439950#M171512</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-05-06T16:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439951#M171513</link>
      <description>&lt;P&gt;May be doing extraction at index time will help.&lt;BR /&gt;
Also scheduled summary indexing is a good option for your case.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 16:37:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439951#M171513</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-05-06T16:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439952#M171514</link>
      <description>&lt;P&gt;the rex is not the problem since im using it in lots of other queries&lt;/P&gt;

&lt;P&gt;how can i use summary ?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 16:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439952#M171514</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-05-06T16:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439953#M171515</link>
      <description>&lt;P&gt;When you say source, you means "source" (generally file name) metadata field? If yes, then try this version: Should be way faster&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index = amer_pj  by source
| `SerialNumber`
| `Region`
| stats dc(SerialNumber) as SerialNumber by Region
| table SerialNumber
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2019 17:55:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439953#M171515</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-05-06T17:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439954#M171516</link>
      <description>&lt;P&gt;perfect !!!&lt;BR /&gt;
please edit your answer so i will be able to accept it&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 18:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439954#M171516</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-05-06T18:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439955#M171517</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149978"&gt;@sarit_s&lt;/a&gt; Write your search and save it as a report .At the end of your search collect the output data in a summary index (say test_summary) using collect command and schedule it to run as per your need may be once a day based on last 30 days date time range. The _time in summary index can be changed as per your need else it will take time at which scheduled search ran.&lt;BR /&gt;
| collect index=test_summary&lt;/P&gt;

&lt;P&gt;Once data is collected in test_summary , you can simply query on index=test_summary in your dashboard or report.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439955#M171517</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2020-09-30T00:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439956#M171518</link>
      <description>&lt;P&gt;thanks !   &lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 05:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439956#M171518</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-05-07T05:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: count number of serialnumber with dc takes lots of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439957#M171519</link>
      <description>&lt;P&gt;Please accept this answer if it solved your problem.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 06:53:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-number-of-serialnumber-with-dc-takes-lots-of-time/m-p/439957#M171519</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-07T06:53:50Z</dc:date>
    </item>
  </channel>
</rss>

