<?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 Searching using timechart is too slow in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Searching-using-timechart-is-too-slow/m-p/326846#M163345</link>
    <description>&lt;P&gt;I have a index naming is "IDS" . It's has 4 sourcetypes. &lt;BR /&gt;
The event of the index is very large. an average of 1.3 million events in 10 minutes&lt;BR /&gt;
I want to use &lt;CODE&gt;timechart&lt;/CODE&gt; to show every 4 hours IDS alert trend. (on dashboard)&lt;BR /&gt;
but timechart is too slow. Is there a faster search?&lt;/P&gt;

&lt;P&gt;Below is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=IDS 
|eval ids=case(sourcetype="WAN-http" OR  sourcetype="WAN-ids","WAN",sourcetype="LAN-http" OR sourcetype="LAN-http","LAN")
|timechart count by ids
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Jan 2018 12:28:07 GMT</pubDate>
    <dc:creator>xsstest</dc:creator>
    <dc:date>2018-01-25T12:28:07Z</dc:date>
    <item>
      <title>Searching using timechart is too slow</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-using-timechart-is-too-slow/m-p/326846#M163345</link>
      <description>&lt;P&gt;I have a index naming is "IDS" . It's has 4 sourcetypes. &lt;BR /&gt;
The event of the index is very large. an average of 1.3 million events in 10 minutes&lt;BR /&gt;
I want to use &lt;CODE&gt;timechart&lt;/CODE&gt; to show every 4 hours IDS alert trend. (on dashboard)&lt;BR /&gt;
but timechart is too slow. Is there a faster search?&lt;/P&gt;

&lt;P&gt;Below is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=IDS 
|eval ids=case(sourcetype="WAN-http" OR  sourcetype="WAN-ids","WAN",sourcetype="LAN-http" OR sourcetype="LAN-http","LAN")
|timechart count by ids
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jan 2018 12:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-using-timechart-is-too-slow/m-p/326846#M163345</guid>
      <dc:creator>xsstest</dc:creator>
      <dc:date>2018-01-25T12:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Searching using timechart is too slow</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-using-timechart-is-too-slow/m-p/326847#M163346</link>
      <description>&lt;P&gt;Since the case statement in your eval is based on sourcetype, you're effectively doing a count by sourcetype. That can be done much faster using tstats.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=IDS by sourcetype,_time
| eval ids=case(sourcetype="WAN-http" OR  sourcetype="WAN-ids","WAN",sourcetype="LAN-http" OR sourcetype="LAN-http","LAN")
| timechart sum(count) by ids
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jan 2018 12:38:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-using-timechart-is-too-slow/m-p/326847#M163346</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-01-25T12:38:06Z</dc:date>
    </item>
  </channel>
</rss>

