<?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 search using the following single index. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340088#M100865</link>
    <description>&lt;P&gt;Martin,&lt;/P&gt;

&lt;P&gt;This does speed it up a little bit and is more condensed than what I have so thank you for this.&lt;/P&gt;

&lt;P&gt;Scott&lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2017 12:56:41 GMT</pubDate>
    <dc:creator>slgizmo</dc:creator>
    <dc:date>2017-08-01T12:56:41Z</dc:date>
    <item>
      <title>Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340086#M100863</link>
      <description>&lt;P&gt;I am working on creation of a dash board that consists of the following search and it does function and return the information that I am needing.  Further, I have this set for Month to date so I can see how many users per day are connecting to the system.  However, the search is very slow and I would like to find a way to make this a little faster.  Is there anything I can do to this search string?&lt;/P&gt;

&lt;P&gt;index=xd sourcetype="xendesktop:7:session" |dedup UserName date_mday | stats count by date_mday&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340086#M100863</guid>
      <dc:creator>slgizmo</dc:creator>
      <dc:date>2020-09-29T15:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340087#M100864</link>
      <description>&lt;P&gt;This is a prettier search string doing essentially the same thing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xd sourcetype="xendesktop:7:session" | timechart span=1d dc(UserName)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, the bulk of the work will be event retrieval and parsing - I guess, without seeing your job inspector there are only guesses.&lt;BR /&gt;
To speeding that up your best approach is to filter more. Is there a "connection established" event that contains all you need? If so, search for just that.&lt;/P&gt;

&lt;P&gt;Once all the regular speedup approaches are exhausted, this type of search suits data model acceleration very well.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 12:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340087#M100864</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-08-01T12:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340088#M100865</link>
      <description>&lt;P&gt;Martin,&lt;/P&gt;

&lt;P&gt;This does speed it up a little bit and is more condensed than what I have so thank you for this.&lt;/P&gt;

&lt;P&gt;Scott&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 12:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340088#M100865</guid>
      <dc:creator>slgizmo</dc:creator>
      <dc:date>2017-08-01T12:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340089#M100866</link>
      <description>&lt;P&gt;Hi slgizmo,&lt;BR /&gt;
did you explored Splunk acceleration (&lt;A href="http://docs.splunk.com/Documentation/Hunk/6.4.7/Hunk/Workwithreportacceleration"&gt;http://docs.splunk.com/Documentation/Hunk/6.4.7/Hunk/Workwithreportacceleration&lt;/A&gt;)?&lt;/P&gt;

&lt;P&gt;I usually use tscollect:&lt;BR /&gt;
- create a search with the fields you need &lt;CODE&gt;index=xd sourcetype="xendesktop:7:session" | dedup UserName date_mday | table _time UserName&lt;/CODE&gt; &lt;BR /&gt;
- add &lt;CODE&gt;| tscollect namespace=&amp;lt;namespace&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
- schedule this search&lt;BR /&gt;
- create a search like the following &lt;CODE&gt;| tstats count AS cnt FROM &amp;lt;namespace&amp;gt; GROUPBY UserName | timechart span=1d sum(cnt) by UserName&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 13:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340089#M100866</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-01T13:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340090#M100867</link>
      <description>&lt;P&gt;Giuseppe,&lt;/P&gt;

&lt;P&gt;So I am trying your solution and if I understand properly when I create the search and run it a new TSIDX is created and allows the follow-up search using | tstats .  The following is what I have set&lt;/P&gt;

&lt;P&gt;Saved Search to be ran once a day&lt;BR /&gt;
index=xd sourcetype="xendesktop:7:session" | dedup UserName date_mday | table _time UserName | tscollect namespace=DailyUserUsage&lt;/P&gt;

&lt;P&gt;This shows me 86 for the count and then if I run the following&lt;/P&gt;

&lt;P&gt;| tstats count AS cnt FROM DailyUserUsage GROUPBY UserName | timechart span=1d sum(cnt) by UserName&lt;/P&gt;

&lt;P&gt;I get nothing returned.  Any idea why?&lt;/P&gt;

&lt;P&gt;Gizmo&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 14:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340090#M100867</guid>
      <dc:creator>slgizmo</dc:creator>
      <dc:date>2017-08-03T14:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340091#M100868</link>
      <description>&lt;P&gt;run | tstats count AS cnt FROM DailyUserUsage GROUPBY UserName and see if you have results:&lt;BR /&gt;
if there are results add _time after GROUPBY,&lt;BR /&gt;
if you haven't results see if the search with tscollect gives results without tscollect.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:06:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340091#M100868</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-03T15:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340092#M100869</link>
      <description>&lt;P&gt;Giuseppe,&lt;BR /&gt;
If I run the string prior to the tscollect I am seeing the events and Statistics.  However, if I try to run | tstats I receive the following "Error in 'tstats' command: this command must be the first command of a search.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:44:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340092#M100869</guid>
      <dc:creator>slgizmo</dc:creator>
      <dc:date>2017-08-03T15:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340093#M100870</link>
      <description>&lt;P&gt;I highly recommend data model acceleration in favour of &lt;CODE&gt;tscollect&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340093#M100870</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-08-03T15:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340094#M100871</link>
      <description>&lt;P&gt;Martin,&lt;BR /&gt;
As I am a newbie when it comes to this I am willing to try anything to learn more about it.  Do you have a recommended link that I can read on how to set data modeling up?&lt;BR /&gt;
Gizmo&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:50:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340094#M100871</guid>
      <dc:creator>slgizmo</dc:creator>
      <dc:date>2017-08-03T15:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340095#M100872</link>
      <description>&lt;P&gt;Tutorial: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/PivotTutorial/WelcometothePivotTutorial"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.2/PivotTutorial/WelcometothePivotTutorial&lt;/A&gt;&lt;BR /&gt;
Actual Docs: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/Knowledge/Aboutdatamodels"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.2/Knowledge/Aboutdatamodels&lt;/A&gt; &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/Knowledge/Acceleratedatamodels"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.2/Knowledge/Acceleratedatamodels&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:56:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340095#M100872</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-08-03T15:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340096#M100873</link>
      <description>&lt;P&gt;Martin,&lt;/P&gt;

&lt;P&gt;Thanks I am looking into this now.&lt;/P&gt;

&lt;P&gt;Gizmo&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 15:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340096#M100873</guid>
      <dc:creator>slgizmo</dc:creator>
      <dc:date>2017-08-03T15:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Speed up search using the following single index.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340097#M100874</link>
      <description>&lt;P&gt;If you're satisfied by this answer, please accept it.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 16:32:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Speed-up-search-using-the-following-single-index/m-p/340097#M100874</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-03T16:32:53Z</dc:date>
    </item>
  </channel>
</rss>

