<?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 Search Optimization in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171783#M49234</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've got ~15.000 events where FieldA exists (in total there are 20.000.000 events). I want to filter out these events and I'm wondering about the performance of different approaches.&lt;/P&gt;

&lt;P&gt;Why is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=X AND FieldA=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so slow compared to this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=X AND FieldA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;BR&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
    <pubDate>Tue, 20 May 2014 13:38:30 GMT</pubDate>
    <dc:creator>HeinzWaescher</dc:creator>
    <dc:date>2014-05-20T13:38:30Z</dc:date>
    <item>
      <title>Search Optimization</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171783#M49234</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've got ~15.000 events where FieldA exists (in total there are 20.000.000 events). I want to filter out these events and I'm wondering about the performance of different approaches.&lt;/P&gt;

&lt;P&gt;Why is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=X AND FieldA=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so slow compared to this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=X AND FieldA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;BR&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2014 13:38:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171783#M49234</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-05-20T13:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search Optimization</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171784#M49235</link>
      <description>&lt;P&gt;In short, the first search takes much longer because it is searching for a lot more stuff eventhough the results are the same.  Splunk reads the searches as follows:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourtype AND X AND FieldA AND *&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourtype AND X AND FieldA&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;As for the thousands of events from an index of millions, I have found that creating a summary index of the _time and _raw data of the events I want to keep makes life a lot easier.  Depending on your situation, you may find accelerated searches work better than summary searches.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2014 13:50:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171784#M49235</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-05-20T13:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search Optimization</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171785#M49236</link>
      <description>&lt;P&gt;The first search doesn't even look for "FieldA", so the first "translated" search there should read:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype AND X AND *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Meaning Splunk won't look for the field name until after it's found all the values, to see if it can couple the searched value to a field called "FieldA". This is a very good thing to remember when constructing searches as obviously the more you can narrow them down the better.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2014 13:56:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171785#M49236</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-05-20T13:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Search Optimization</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171786#M49237</link>
      <description>&lt;P&gt;Thanks a lot, now i've got it&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2014 14:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Optimization/m-p/171786#M49237</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-05-20T14:06:54Z</dc:date>
    </item>
  </channel>
</rss>

