<?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: Speed up a duration search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132337#M36091</link>
    <description>&lt;P&gt;yes, the transaction command is the culprit on the slow down.  I'll take a look at summary indexing&lt;/P&gt;</description>
    <pubDate>Fri, 21 Nov 2014 21:48:33 GMT</pubDate>
    <dc:creator>mark_chuman</dc:creator>
    <dc:date>2014-11-21T21:48:33Z</dc:date>
    <item>
      <title>Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132334#M36088</link>
      <description>&lt;P&gt;Here is my search.  I'm trying to get a report on the duration between an ESXi host sync task in vCenter logs.  The search works ok in searches that are looking over say 15 minutes or so, but seriously slows down when going to 4 days and beyond.  Any idea how to speed things up?  Thanks!&lt;/P&gt;

&lt;P&gt;index=distributed sourcetype=vcenter_* "task-internal" | rex "task-internal-(?\w+)" | transaction TASKID maxspan=-1 | timechart avg(duration)&lt;/P&gt;

&lt;P&gt;Here are example log entries - &lt;/P&gt;

&lt;P&gt;11/21/14 &lt;BR /&gt;
3:59:43.000 PM&lt;BR /&gt;&lt;BR /&gt;
2014-11-21T15:59:43.760-05:00 [01928 info 'commonvpxLro' opID=HB-host-52@132635-1b9acc5a] [VpxLRO] -- BEGIN task-internal-574059 -- host-52 -- VpxdInvtHostSyncHostLRO.Synchronize -- &lt;BR /&gt;
eventtype = nix-all-logs&lt;BR /&gt;
11/21/14 &lt;BR /&gt;
3:59:43.000 PM&lt;BR /&gt;&lt;BR /&gt;
2014-11-21T15:59:43.758-05:00 [11912 info 'commonvpxLro' opID=HB-host-901@183888-5f049582] [VpxLRO] -- FINISH task-internal-574059 -- host-901 -- VpxdInvtHostSyncHostLRO.Synchronize -- &lt;BR /&gt;
eventtype = nix-all-logs&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 21:06:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132334#M36088</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-11-21T21:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132335#M36089</link>
      <description>&lt;P&gt;Have you checked out &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Usesummaryindexing"&gt;summary indexing?&lt;/A&gt; Your search would also be a lot faster if you can find a way to avoid using the &lt;CODE&gt;transaction&lt;/CODE&gt; command, which is notoriously slow (e.g. using &lt;CODE&gt;stats&lt;/CODE&gt; and a by clause)&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 21:31:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132335#M36089</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2014-11-21T21:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132336#M36090</link>
      <description>&lt;P&gt;Agree, also, saving your field extraction to props.conf would also speed up your search.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 21:42:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132336#M36090</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-21T21:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132337#M36091</link>
      <description>&lt;P&gt;yes, the transaction command is the culprit on the slow down.  I'll take a look at summary indexing&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 21:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132337#M36091</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-11-21T21:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132338#M36092</link>
      <description>&lt;P&gt;Aside from speeding things up is there a better way to chart the duration between say these two examples (between a BEGIN and FINISH log entry)?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 21:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132338#M36092</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-11-21T21:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132339#M36093</link>
      <description>&lt;P&gt;Is &lt;A href="http://answers.splunk.com/answers/110676/getting-transaction-times-without-transaction-command.html"&gt;this answer&lt;/A&gt; of any help? They use min &amp;amp; max. &lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 21:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132339#M36093</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2014-11-21T21:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132340#M36094</link>
      <description>&lt;P&gt;Is your task id unique everytime? If yes then your can use stats (first and last of _time ) to calculate duration and that would be way faster than transaction.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 22:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132340#M36094</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-21T22:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up a duration search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132341#M36095</link>
      <description>&lt;P&gt;There are several steps towards speeding up this search:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Remove unnecessary events from the search: &lt;CODE&gt;index=distributed sourcetype=vcenter_* "task-internal" (BEGIN OR FINISH)&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Make the &lt;CODE&gt;transaction&lt;/CODE&gt; more targeted: &lt;CODE&gt;... | transaction TASKID startswith="BEGIN" endswith="FINISH"&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;As suggested in the comments, avoid running one huge &lt;CODE&gt;transaction&lt;/CODE&gt; and either switch to &lt;CODE&gt;stats&lt;/CODE&gt; or chunk up the work with summary indexing. Beware though of transactions that start in one chunk and finish in the other, you will need to write your search to cover that overlap smartly.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I'd test #1 and #2 together first, see if that speeds up the search well enough. If not, consider #3.&lt;/P&gt;

&lt;P&gt;Additionally, do post the timing info at the top of the job inspector for us to look at what's taking up the most time.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Nov 2014 14:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-a-duration-search/m-p/132341#M36095</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-22T14:40:41Z</dc:date>
    </item>
  </channel>
</rss>

