<?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: Splunk optimization : dedup or latest()? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68678#M783</link>
    <description>&lt;P&gt;In a distributed environment, stats is likely to be faster, because the indexers can "prestats" before sending their results to the search head. I think that dedup may do a little of this, but the notable distinction is that dedup can't be used with report acceleration searches. I tend to use stats for this purpose.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2013 13:51:26 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2013-09-24T13:51:26Z</dc:date>
    <item>
      <title>Splunk optimization : dedup or latest()?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68675#M780</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
For last 2 months i created a lot of dashboards on Splunk.&lt;BR /&gt;
In most of my searchs i need to get only the last series of results.&lt;BR /&gt;
I see i use 2 methods, both work well, but i would know which one is more optimized.&lt;BR /&gt;
Sometimes I use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search|dedup MyField sortby -_time|table MyField aField bField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and sometimes I use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search|stats latest(aField),latest(bField) by MyField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is the best to use for short periods/long periods?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 07:10:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68675#M780</guid>
      <dc:creator>timmalos</dc:creator>
      <dc:date>2013-09-20T07:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk optimization : dedup or latest()?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68676#M781</link>
      <description>&lt;P&gt;I would think that &lt;CODE&gt;dedup&lt;/CODE&gt; should be slightly faster, but not by a big margin. Best way to find out is to use the Job Inspector for the searches and look for yourself. It's far more important to limit the initial search, i.e. what comes before the first pipe. Specifying correct &lt;CODE&gt;index, host, sourcetype&lt;/CODE&gt; and time-limits will have far more effect on the search performance.&lt;/P&gt;

&lt;P&gt;However, your &lt;CODE&gt;dedup&lt;/CODE&gt; syntax looks a bit off, shouldn't it be &lt;CODE&gt;sortby&lt;/CODE&gt; instead of &lt;CODE&gt;by&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Search/UsingtheSearchJobInspector"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Search/UsingtheSearchJobInspector&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 07:45:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68676#M781</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-09-20T07:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk optimization : dedup or latest()?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68677#M782</link>
      <description>&lt;P&gt;Ure right for dedup, i wrote all from mind so mistakes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2013 09:22:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68677#M782</guid>
      <dc:creator>timmalos</dc:creator>
      <dc:date>2013-09-20T09:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk optimization : dedup or latest()?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68678#M783</link>
      <description>&lt;P&gt;In a distributed environment, stats is likely to be faster, because the indexers can "prestats" before sending their results to the search head. I think that dedup may do a little of this, but the notable distinction is that dedup can't be used with report acceleration searches. I tend to use stats for this purpose.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2013 13:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Splunk-optimization-dedup-or-latest/m-p/68678#M783</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-24T13:51:26Z</dc:date>
    </item>
  </channel>
</rss>

