<?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 does the query take so long to  find time duration in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-query-take-so-long-to-find-time-duration/m-p/72421#M18115</link>
    <description>&lt;P&gt;The data that splunk pulls out of the indexes is governed by the initial search (everything before the 1st | )&lt;/P&gt;

&lt;P&gt;In this case you're pulling every event for the last 30 days (from disk), then having &lt;CODE&gt;stats&lt;/CODE&gt; operate on that dataset.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Splexicon:Streamingcommand"&gt;This&lt;/A&gt; describes the difference between streaming and non-streaming search commands&lt;/P&gt;</description>
    <pubDate>Mon, 24 Dec 2012 09:22:39 GMT</pubDate>
    <dc:creator>jonuwz</dc:creator>
    <dc:date>2012-12-24T09:22:39Z</dc:date>
    <item>
      <title>Why does the query take so long to  find time duration</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-query-take-so-long-to-find-time-duration/m-p/72420#M18114</link>
      <description>&lt;PRE&gt;
&lt;CODE&gt;
index=test_index
| stats min(_time) AS earliest max(_time) AS latest
| eval duration=latest-earliest
| table duration latest earliest
&lt;/CODE&gt;
&lt;/PRE&gt;

&lt;P&gt;When&lt;BR /&gt;
I run this query for 30 days it takes very long to run.&lt;/P&gt;

&lt;P&gt;Ideally shouldn't it be running fast because its max and min time and should use efficient search to get it?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Dec 2012 07:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-query-take-so-long-to-find-time-duration/m-p/72420#M18114</guid>
      <dc:creator>ma_anand1984</dc:creator>
      <dc:date>2012-12-24T07:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the query take so long to  find time duration</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-query-take-so-long-to-find-time-duration/m-p/72421#M18115</link>
      <description>&lt;P&gt;The data that splunk pulls out of the indexes is governed by the initial search (everything before the 1st | )&lt;/P&gt;

&lt;P&gt;In this case you're pulling every event for the last 30 days (from disk), then having &lt;CODE&gt;stats&lt;/CODE&gt; operate on that dataset.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Splexicon:Streamingcommand"&gt;This&lt;/A&gt; describes the difference between streaming and non-streaming search commands&lt;/P&gt;</description>
      <pubDate>Mon, 24 Dec 2012 09:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-query-take-so-long-to-find-time-duration/m-p/72421#M18115</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2012-12-24T09:22:39Z</dc:date>
    </item>
  </channel>
</rss>

