<?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: Why is my search returning a different set of results after I replaced the 'dedup' command with 'stats dc()' to improve performance? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160293#M45298</link>
    <description>&lt;P&gt;Is it the same without the &lt;CODE&gt;fillnull&lt;/CODE&gt; command?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2015 13:35:59 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-08-04T13:35:59Z</dc:date>
    <item>
      <title>Why is my search returning a different set of results after I replaced the 'dedup' command with 'stats dc()' to improve performance?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160292#M45297</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I'm using the search below to successfully produce a given group of stats:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;auditSource=ts auditType=RenewalStarted NOT [search auditSource=ts auditType=RenewalCompleted | table detail.nino] |
iplocation tags.clientIP |dedup detail.nino | fillnull value="Country Not Found" Country | stats count by Country
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Because I know that the &lt;CODE&gt;dedup&lt;/CODE&gt; command can be resource intensive, I've tried changing this by using the &lt;CODE&gt;stats dc&lt;/CODE&gt; command as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;auditSource=ts auditType=RenewalStarted NOT [search auditSource=ts auditType=RenewalCompleted | table detail.nino] |
iplocation tags.clientIP | fillnull value="Country Not Found" Country | stats dc(detail.nino) By Country
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem I have is that although I'm using the same date period, the search is not returning the same set of results.&lt;/P&gt;

&lt;P&gt;I just wondered whether someone may be able to look at this please and offer some guidance on where I may have gone wrong.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 06:39:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160292#M45297</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-08-04T06:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search returning a different set of results after I replaced the 'dedup' command with 'stats dc()' to improve performance?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160293#M45298</link>
      <description>&lt;P&gt;Is it the same without the &lt;CODE&gt;fillnull&lt;/CODE&gt; command?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 13:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160293#M45298</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-04T13:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my search returning a different set of results after I replaced the 'dedup' command with 'stats dc()' to improve performance?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160294#M45299</link>
      <description>&lt;P&gt;Hi thank you for coming back to me. When I omit the fillnull from the second query the number of events are still greater than the initial query and the count significantly reduced.&lt;/P&gt;

&lt;P&gt;However If I changed the latter query to  &lt;CODE&gt;auditSource=tc auditType=TCStarted NOT [search auditSource=tc auditType=TCCompleted | table detail.nino] | iplocation tags.clientIP | fillnull value="Country Not Found" | stats dc(detail.nino) By Country&lt;/CODE&gt; which is now working perfectly.&lt;/P&gt;

&lt;P&gt;Kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 06:28:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-search-returning-a-different-set-of-results-after-I/m-p/160294#M45299</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-08-05T06:28:01Z</dc:date>
    </item>
  </channel>
</rss>

