<?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 Alternative to dedup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332297#M98868</link>
    <description>&lt;P&gt;I'm sorting by time cause I want the latest time for every distinct host. Im doing this and it works. But dedup is fairly heavy.. I've tried searching for alternatives but to no avail. Can you guys point me in the right direction ? thanks&lt;/P&gt;

&lt;P&gt;Be mindfull that I have a lot more fields in the stats pipe&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats
       count(duration) as request_count 
        sum(duration) as total_duration
        sum(exc_thrown) as error_count
        .....  by host _time | sort - _time  | dedup host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I currently have uptaded to &lt;CODE&gt;| dedup host stortby -_time&lt;/CODE&gt; instead of &lt;CODE&gt;| sort - _time  | dedup host&lt;/CODE&gt;. Don't know which is faster&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 10:20:11 GMT</pubDate>
    <dc:creator>greggz</dc:creator>
    <dc:date>2018-01-24T10:20:11Z</dc:date>
    <item>
      <title>Alternative to dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332297#M98868</link>
      <description>&lt;P&gt;I'm sorting by time cause I want the latest time for every distinct host. Im doing this and it works. But dedup is fairly heavy.. I've tried searching for alternatives but to no avail. Can you guys point me in the right direction ? thanks&lt;/P&gt;

&lt;P&gt;Be mindfull that I have a lot more fields in the stats pipe&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats
       count(duration) as request_count 
        sum(duration) as total_duration
        sum(exc_thrown) as error_count
        .....  by host _time | sort - _time  | dedup host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I currently have uptaded to &lt;CODE&gt;| dedup host stortby -_time&lt;/CODE&gt; instead of &lt;CODE&gt;| sort - _time  | dedup host&lt;/CODE&gt;. Don't know which is faster&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 10:20:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332297#M98868</guid>
      <dc:creator>greggz</dc:creator>
      <dc:date>2018-01-24T10:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative to dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332298#M98869</link>
      <description>&lt;P&gt;you can check execution time in &lt;CODE&gt;jobs&amp;gt;inspect job&lt;/CODE&gt;. Using dedup on larger dataset can be expensive. There are cases where you can replace dedup by using a stats &lt;CODE&gt;latest(...&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | stats
latest(_time) as latest_time        
count(duration) as request_count 
         sum(duration) as total_duration
         sum(exc_thrown) as error_count
         .....  by host | sort -  latest_time  | eval latest_time=strftime(latest_time,"%d-%m-%Y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 10:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332298#M98869</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-24T10:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative to dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332299#M98870</link>
      <description>&lt;P&gt;No it's not helping, I sort by host and _time because I need one host at the specific time for all distinct hosts. This code pulling in values from other times to the same host giving false values&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 10:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alternative-to-dedup/m-p/332299#M98870</guid>
      <dc:creator>greggz</dc:creator>
      <dc:date>2018-01-24T10:59:36Z</dc:date>
    </item>
  </channel>
</rss>

