<?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: How can I optimize my search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237593#M70604</link>
    <description>&lt;P&gt;It's quite large lookup. I want to find the OS types so installed TA_user_agents add-on. Lookup is present in it&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:52:24 GMT</pubDate>
    <dc:creator>Deepali529</dc:creator>
    <dc:date>2020-09-29T11:52:24Z</dc:date>
    <item>
      <title>How can I optimize my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237591#M70602</link>
      <description>&lt;P&gt;This search is taking too much time to execute, around 20 mins. Is it because of the lookup?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="access_log_index" sourcetype="access_log" | rename agent as http_user_agent | lookup user_agents http_user_agent | stats count by  ua_os_family | rename ua_os_family as os_type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I optimize my search? Any suggestions will be appreciated.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 05:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237591#M70602</guid>
      <dc:creator>Deepali529</dc:creator>
      <dc:date>2016-11-24T05:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I optimize my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237592#M70603</link>
      <description>&lt;P&gt;You should look at the job inspector and see where most of the time is being spent &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.0/Search/ViewsearchjobpropertieswiththeJobInspector"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.0/Search/ViewsearchjobpropertieswiththeJobInspector&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;How big is your lookup table?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 05:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237592#M70603</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-11-24T05:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I optimize my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237593#M70604</link>
      <description>&lt;P&gt;It's quite large lookup. I want to find the OS types so installed TA_user_agents add-on. Lookup is present in it&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237593#M70604</guid>
      <dc:creator>Deepali529</dc:creator>
      <dc:date>2020-09-29T11:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I optimize my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237594#M70605</link>
      <description>&lt;P&gt;"quite large" can be relative.. If your lookup is as massive as you claim then you could always use a case statement to match on rather than a lookup table.. It should be faster but you can test this by creating a simple match case and run it over a small time frame then look at the job inspector to see how long it took. Then run the same sample over the lookup and see how long that took&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval os = case(match(useragent,"Windows .. 5\.1"),"Windows XP",match(useragent,"droid"),"Android",match(useragent,"Windows NT 6.1"),"Windows 7") | eval browser = case(match(useragent,"MSIE 10.0"),"Internet Explorer 10.0",match(useragent,"Chrome"),"Chrome",match(useragent,"Safari/"),"Safari") | eval arch = case(match(useragent,"droid"),"android",match(useragent,"iPad"),"ipad",match(useragent,"iPod"),"ipod")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:25:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237594#M70605</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-11-24T14:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I optimize my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237595#M70606</link>
      <description>&lt;P&gt;Thanks skoelpin &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
It reduces the execution time of query from 816 seconds to 28 seconds&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 09:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-optimize-my-search/m-p/237595#M70606</guid>
      <dc:creator>Deepali529</dc:creator>
      <dc:date>2016-11-25T09:03:57Z</dc:date>
    </item>
  </channel>
</rss>

