<?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 How can I improve performance on a query with join? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-improve-performance-on-a-query-with-join/m-p/329093#M5281</link>
    <description>&lt;P&gt;In this query I'm joining the same search twice.&lt;BR /&gt;
I'm looking for every host's top 10 users (in datavolume) and those user's top 10 apps used.&lt;/P&gt;

&lt;P&gt;This query is very slow and the subsearch is auto-finalized. How can I improve this query?&lt;/P&gt;

&lt;P&gt;host=$field1$ sourcetype=fgt_traffic "user=" service=HTTPS (app=dropbox OR app=slack OR app=trello OR app=hightail OR app=icloud OR app=box OR app=evernote OR app=salesforce OR app=google*docs OR app=google*drive OR appcat="Storage.Backup" OR appcat=Collaboration NOT "Microsoft" NOT "Skype" NOT "OneDrive" NOT "Wikipedia") &lt;BR /&gt;
| stats sum(BytesOUT_to_Megabytes) as "MB Sent" by user,app&lt;BR /&gt;
| join user [search sourcetype=fgt_traffic host=$field1$ "user=" service=HTTPS (app=dropbox OR app=slack OR app=trello OR app=hightail OR app=icloud OR app=box OR app=evernote OR app=salesforce OR app=google*docs OR app=google*drive OR appcat="Storage.Backup" OR appcat=Collaboration NOT "Microsoft" NOT "Skype" NOT "OneDrive" NOT "Wikipedia")&lt;BR /&gt;
| stats sum(BytesOUT_to_Megabytes) as Total by user| sort -Total| head 10 ]&lt;BR /&gt;
| sort -Total, -"MB Sent"&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:40:05 GMT</pubDate>
    <dc:creator>elzeviske</dc:creator>
    <dc:date>2020-09-29T13:40:05Z</dc:date>
    <item>
      <title>How can I improve performance on a query with join?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-improve-performance-on-a-query-with-join/m-p/329093#M5281</link>
      <description>&lt;P&gt;In this query I'm joining the same search twice.&lt;BR /&gt;
I'm looking for every host's top 10 users (in datavolume) and those user's top 10 apps used.&lt;/P&gt;

&lt;P&gt;This query is very slow and the subsearch is auto-finalized. How can I improve this query?&lt;/P&gt;

&lt;P&gt;host=$field1$ sourcetype=fgt_traffic "user=" service=HTTPS (app=dropbox OR app=slack OR app=trello OR app=hightail OR app=icloud OR app=box OR app=evernote OR app=salesforce OR app=google*docs OR app=google*drive OR appcat="Storage.Backup" OR appcat=Collaboration NOT "Microsoft" NOT "Skype" NOT "OneDrive" NOT "Wikipedia") &lt;BR /&gt;
| stats sum(BytesOUT_to_Megabytes) as "MB Sent" by user,app&lt;BR /&gt;
| join user [search sourcetype=fgt_traffic host=$field1$ "user=" service=HTTPS (app=dropbox OR app=slack OR app=trello OR app=hightail OR app=icloud OR app=box OR app=evernote OR app=salesforce OR app=google*docs OR app=google*drive OR appcat="Storage.Backup" OR appcat=Collaboration NOT "Microsoft" NOT "Skype" NOT "OneDrive" NOT "Wikipedia")&lt;BR /&gt;
| stats sum(BytesOUT_to_Megabytes) as Total by user| sort -Total| head 10 ]&lt;BR /&gt;
| sort -Total, -"MB Sent"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-improve-performance-on-a-query-with-join/m-p/329093#M5281</guid>
      <dc:creator>elzeviske</dc:creator>
      <dc:date>2020-09-29T13:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I improve performance on a query with join?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-can-I-improve-performance-on-a-query-with-join/m-p/329094#M5282</link>
      <description>&lt;P&gt;you could try something with streamstats maybe?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=$field1$ sourcetype=fgt_traffic "user=" service=HTTPS (app=dropbox OR app=slack OR app=trello OR app=hightail OR app=icloud OR app=box OR app=evernote OR app=salesforce OR app=google*docs OR app=google*drive OR appcat="Storage.Backup" OR appcat=Collaboration NOT "Microsoft" NOT "Skype" NOT "OneDrive" NOT "Wikipedia") 
| streamstats sum(BytesOUT_to_Megabytes) as Total by user
| stats sum(BytesOUT_to_Megabytes) as "MB Sent" max(Total) as Total by user,app
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Apr 2017 11:31:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-can-I-improve-performance-on-a-query-with-join/m-p/329094#M5282</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2017-04-13T11:31:23Z</dc:date>
    </item>
  </channel>
</rss>

