<?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: How to improve the performance of a search with multiple tstats command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399325#M115802</link>
    <description>&lt;P&gt;attached screenshot of job inspector. most of the time is spent on appendcols, thatswhy  I am looking option of running these two queries parallel as these are independent. mutlisearch is not working either.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 13:16:44 GMT</pubDate>
    <dc:creator>AKG1_old1</dc:creator>
    <dc:date>2019-05-29T13:16:44Z</dc:date>
    <item>
      <title>How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399323#M115800</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My search query is having mutliple tstats commands.  Also there are two independent search query seprated by appencols. Looking for suggestion to improve performance. &lt;/P&gt;

&lt;P&gt;I tried using multisearch but its not working saying subsearch containing non-streaming command.&lt;/P&gt;

&lt;P&gt;Query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=false max(LIVEBOOK.Elapsed) AS Elapsed FROM datamodel=MXTIMING_LIVEBOOK_V2 WHERE host=QCST_RSAT_V42 LIVEBOOK.Elapsed &amp;gt; 0 AND LIVEBOOK.Context+Command="*" AND 
    [| tstats count FROM datamodel=MXTIMING_LIVEBOOK_V2 WHERE host=QCST_RSAT_V42 LIVEBOOK.NPID="727614" GROUPBY source 
    | table source ] 
    GROUPBY LIVEBOOK.Context+Command LIVEBOOK.Time _time span=1s 
| rename LIVEBOOK.Context+Command as Context+Command 
| rename LIVEBOOK.Time as Time 
| timechart bins=2000 max(Elapsed) by Context+Command 
| appendcols 
    [| tstats summariesonly=false max(LIVEBOOK.Memory) AS VmPeak max(LIVEBOOK.VmHWM_V2) AS VmHWM max(LIVEBOOK.Malloc_V2) AS Malloc FROM datamodel=MXTIMING_LIVEBOOK_V2 WHERE host=QCST_RSAT_V42 AND LIVEBOOK.Elapsed &amp;gt; 0 AND 
        [| tstats count FROM datamodel=MXTIMING_LIVEBOOK_V2 WHERE host=QCST_RSAT_V42 LIVEBOOK.NPID="727614" GROUPBY source 
        | table source ]
        AND LIVEBOOK.Context+Command="*" GROUPBY LIVEBOOK.Context+Command LIVEBOOK.Time _time span=1s 
    | timechart bins=2000 max(VmPeak) as Mem_VmPeak ] 
| fields - OTHER 
| eval Mem_Malloc = if(Mem_Malloc==0,"",Mem_Malloc) 
| eval Mem_VmHWM = if(Mem_VmHWM==0,"",Mem_VmHWM) 
| eval Mem_VmPeak = if(Mem_VmPeak==0,"",Mem_VmPeak)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7127i8A4E5D1AA2020E9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7128i0CAF485B0D4B4809/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 12:13:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399323#M115800</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-05-29T12:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399324#M115801</link>
      <description>&lt;P&gt;Have you checked the job inspector to see where the query is spending its time?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 13:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399324#M115801</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-29T13:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399325#M115802</link>
      <description>&lt;P&gt;attached screenshot of job inspector. most of the time is spent on appendcols, thatswhy  I am looking option of running these two queries parallel as these are independent. mutlisearch is not working either.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 13:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399325#M115802</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-05-29T13:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399326#M115803</link>
      <description>&lt;P&gt;I think this can be done without &lt;CODE&gt;appendcols&lt;/CODE&gt;.  Try this query to see if it helps.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=false max(LIVEBOOK.Elapsed) AS Elapsed max(LIVEBOOK.Memory) AS VmPeak max(LIVEBOOK.VmHWM_V2) AS VmHWM max(LIVEBOOK.Malloc_V2) AS Malloc FROM datamodel=MXTIMING_LIVEBOOK_V2 WHERE host=QCST_RSAT_V42 LIVEBOOK.Elapsed &amp;gt; 0 AND LIVEBOOK.Context+Command="*" AND 
     [| tstats count FROM datamodel=MXTIMING_LIVEBOOK_V2 WHERE host=QCST_RSAT_V42 LIVEBOOK.NPID="727614" GROUPBY source 
     | fields source
     | format ] 
     GROUPBY LIVEBOOK.Context+Command LIVEBOOK.Time _time span=1s 
| rename LIVEBOOK.* as * 
| bin bins=2000 _time 
| stats max(Elapsed) max(VmPeak) as Mem_VmPeak by Context+Command 
| fields - OTHER 
| eval Mem_VmPeak = if(Mem_VmPeak==0,"",Mem_VmPeak)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 15:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399326#M115803</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-29T15:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399327#M115804</link>
      <description>&lt;P&gt;Thanks but this query producing different results.  &lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 16:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399327#M115804</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-05-29T16:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399328#M115805</link>
      <description>&lt;P&gt;How is it different?  &lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 19:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399328#M115805</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-29T19:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399329#M115806</link>
      <description>&lt;P&gt;output produce only two column. oringinal query have mutiple column(for each context+command and one for memory).  &lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 08:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399329#M115806</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-05-30T08:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399330#M115807</link>
      <description>&lt;P&gt;Modify the &lt;CODE&gt;stats&lt;/CODE&gt; command to add the columns to want.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 13:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399330#M115807</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-30T13:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to improve the performance of a search with multiple tstats command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399331#M115808</link>
      <description>&lt;P&gt;there is no fixed / same occurance of Context+Command. My reason for posting this question  is if there is anyway to run muliple query in parallel using tstats.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 08:17:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-improve-the-performance-of-a-search-with-multiple-tstats/m-p/399331#M115808</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-05-31T08:17:56Z</dc:date>
    </item>
  </channel>
</rss>

