<?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: Splunk search performance using TERM() function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688741#M234791</link>
    <description>&lt;P&gt;Adding to that answer - your search term if you just search for "1.2.3.4" might not encompass a whole major-breaker-delimited search term but be somewhere in the middle&amp;nbsp; of a "word" delimited by minor breakers - like "version.1.2.3.4". So Splunk searches for 1, 2, 3 and 4 separately and checks if the events matching all of those partial terms match the literal search term.&lt;/P&gt;&lt;P&gt;If you explicitly tell it to find TERM(1.2.3.4), it will find only those events for which the term 1.2.3.4.&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2024 21:13:00 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-05-26T21:13:00Z</dc:date>
    <item>
      <title>Splunk search performance using TERM() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688727#M234787</link>
      <description>&lt;P&gt;Hello, I'm Splunk Newbie.&lt;/P&gt;&lt;P&gt;This is a post that I found while looking for improvement of Splunk's search performance, but I'm asking you a question because it's a little confusing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I referred to the two posts below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://splunk.illinois.edu/splunk-at-illinois/using-splunk/searching-splunk/how-to-optimize-your-searches/" target="_blank" rel="noopener"&gt;https://splunk.illinois.edu/splunk-at-illinois/using-splunk/searching-splunk/how-to-optimize-your-searches/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://idelta.co.uk/3-easy-ways-to-speed-up-your-splunk-searches-and-why-they-help/" target="_blank" rel="noopener"&gt;https://idelta.co.uk/3-easy-ways-to-speed-up-your-splunk-searches-and-why-they-help/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="munang_0-1716731887849.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31003i14646156F79E6D19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="munang_0-1716731887849.png" alt="munang_0-1716731887849.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="munang_1-1716731907890.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31004iA695352DA6A6AE88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="munang_1-1716731907890.png" alt="munang_1-1716731907890.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="munang_2-1716731929995.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/31005i2878FD2C81BCADDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="munang_2-1716731929995.png" alt="munang_2-1716731929995.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Question 1)&lt;BR /&gt;- index=firewall_data 127.0.0.1&lt;BR /&gt;Or&lt;BR /&gt;- index=firewall_data "127.0.0.1"&lt;BR /&gt;If I search that, because of the internal segmentation process&lt;/P&gt;&lt;P&gt;127&lt;BR /&gt;127 1&lt;BR /&gt;127 0 1&lt;/P&gt;&lt;P&gt;Is it right to search by dividing it into three approach?&lt;/P&gt;&lt;P&gt;Because of this, If I use index=firewall_data TERM (127.1.1.24), is it correct that the breaker is not used and it shows better performance?&lt;/P&gt;&lt;P&gt;Question 2)&lt;/P&gt;&lt;P&gt;index=firewall_data "127.0.0.1" has more resources if the assumptions in question 1 are correct&lt;/P&gt;&lt;P&gt;The index= firewall_data TERM (127.1.1.24) should perform better, but when tested, it actually did the same.&lt;/P&gt;&lt;P&gt;It says that the data I searched for and the resource (time) are all the same, why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 14:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688727#M234787</guid>
      <dc:creator>munang</dc:creator>
      <dc:date>2024-05-26T14:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search performance using TERM() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688734#M234790</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248607"&gt;@munang&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Depending on your segmentation configuration,&amp;nbsp;&lt;SPAN&gt;127.0.0.1 will be indexed as:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;0&lt;BR /&gt;1&lt;BR /&gt;127&lt;BR /&gt;127.0.0.1&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;0&lt;BR /&gt;1&lt;BR /&gt;127&lt;BR /&gt;127.0&lt;BR /&gt;127.0.0&lt;BR /&gt;127.0.0.1&lt;/P&gt;&lt;P&gt;You can verify this (relatively) easily with with an empty index and the walklex command. See&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Walklex" target="_self"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Walklex&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;With segmenters.conf&amp;nbsp;INTERMEDIATE_MAJORS = false (the default):&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval _raw="127.0.0.1"&lt;BR /&gt;| collect index=walklex_test&lt;/P&gt;&lt;P&gt;$ /opt/splunk/bin/splunk _internal call /data/indexes/walklex_test/roll-hot-buckets&lt;/P&gt;&lt;P&gt;| walklex type=term index=walklex_test&lt;BR /&gt;| table term&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;term&lt;/STRONG&gt;&lt;BR /&gt;0&lt;BR /&gt;1&lt;BR /&gt;127&lt;BR /&gt;127.0.0.1&lt;/P&gt;&lt;P&gt;Using a source type and segmentation with INTERMEDIATE_MAJORS = true:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;term&lt;/STRONG&gt;&lt;BR /&gt;0&lt;BR /&gt;1&lt;BR /&gt;127&lt;BR /&gt;127.0&lt;BR /&gt;127.0.0&lt;BR /&gt;127.0.0.1&lt;/P&gt;&lt;P&gt;Both 127.0.0.1 and "127.0.0.1" will use the following base lispy at the indexing tier:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[ AND 0 1 127 ]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can judge the efficiency of your search using the method you observed in your second question. In the search job inspector, you'll see: "This search has completed and has returned X results by scanning Y events in Z seconds." If X != Y, your search is scanning more events than needed, and introducing TERM() or otherwise modifying your search may improve efficiency.&lt;/P&gt;&lt;P&gt;TERM(127.0.0.1)&amp;nbsp; will use the following base lispy at the indexing tier, also as you observed:&lt;/P&gt;&lt;P&gt;[ AND 127.0.0.1 ]&lt;/P&gt;&lt;P&gt;With&amp;nbsp;INTERMEDIATE_MAJORS = false, TERM(127.0) will return no results.&lt;/P&gt;&lt;P&gt;With INTERMEDIATE_MAJORS = true, TERM(127.0) will return events with 127.0.0.1, 127.0.a$b. 127.0-foo, etc.&lt;/P&gt;&lt;P&gt;If searches with and without TERM() return X results by scanning Y events and X == Y, then the same number of events contain the segmented terms as contain the complete term. In this case, there is no direct efficiency to be gained by using TERM(). If your observations contradict this, i.e. you have events that match&amp;nbsp;&lt;SPAN&gt;127.1.1.24 but do not match TERM(127.1.1.24), then the answer may have something to do inconsistent time ranges across searches, misconfigured search peers, or misconfigured indexer clustering.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 16:36:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688734#M234790</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2024-05-26T16:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search performance using TERM() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688741#M234791</link>
      <description>&lt;P&gt;Adding to that answer - your search term if you just search for "1.2.3.4" might not encompass a whole major-breaker-delimited search term but be somewhere in the middle&amp;nbsp; of a "word" delimited by minor breakers - like "version.1.2.3.4". So Splunk searches for 1, 2, 3 and 4 separately and checks if the events matching all of those partial terms match the literal search term.&lt;/P&gt;&lt;P&gt;If you explicitly tell it to find TERM(1.2.3.4), it will find only those events for which the term 1.2.3.4.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 21:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688741#M234791</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-05-26T21:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search performance using TERM() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688768#M234794</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/49493"&gt;@tscroggins&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you!&lt;BR /&gt;I completely understood the clear explanation.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 12:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-performance-using-TERM-function/m-p/688768#M234794</guid>
      <dc:creator>munang</dc:creator>
      <dc:date>2024-05-27T12:15:57Z</dc:date>
    </item>
  </channel>
</rss>

