<?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 to edit my filtering search using a select drop-down value to improve performance? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176303#M50636</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;No idea why it is slower when putting field1=* in your search. It is supposedly same, based on my experience.&lt;/P&gt;

&lt;P&gt;Anyways you can achieve your objective by trying the below guide:&lt;/P&gt;

&lt;P&gt;On your dropdown box:&lt;BR /&gt;
 1. On "token Prefix" under "token options" input this: field1="&lt;BR /&gt;
 2. On "token suffix" under "token options" input this: "&lt;BR /&gt;
 3. Leave empty the value of "ALL" under static options.&lt;BR /&gt;
 4. Then click save.&lt;/P&gt;

&lt;P&gt;On the search inside your panel:&lt;BR /&gt;
index=… source=… $field1$ | chart ...&lt;/P&gt;

&lt;P&gt;Cheers...&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jan 2015 03:46:40 GMT</pubDate>
    <dc:creator>jhlopez</dc:creator>
    <dc:date>2015-01-09T03:46:40Z</dc:date>
    <item>
      <title>How to edit my filtering search using a select drop-down value to improve performance?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176302#M50635</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;I have a small performance problem and I'd like to know if someone can help me. I have a basic dashboard with a dropdown populated from a query (everything works), to which I added a static option "ALL" with a value of *.&lt;/P&gt;

&lt;P&gt;Let's say my field and token are both named "field1", when I select it, updates a graph in the same dashboard. The query I use for this graph is the following :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=… source=…  field1=$field1$ | chart ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works, but is slow when I use the "ALL" static option, as it translates to :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=… source=…  field1=* | chart ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I did try the same search without the field1=* (which gives the same results) and it is very fast, so that's what I'm trying to achieve, when "ALL" is selected :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=… source=… | chart ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried a couple of ways but cannot find the right solution. I'm probably looking at something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=… source=…  (X OR field1=$field1$) | chart …
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where X would be some kind of condition that would render the expression always true but can't find the right syntax.&lt;/P&gt;

&lt;P&gt;I also tried:&lt;BR /&gt;
 - setting the value to null, and having index=… source=…  (isnull($field1$) OR field1="$field1$") | chart ...&lt;BR /&gt;
 - setting the value to true, and having index=… source=…  ($field1$ OR field1="$field1$") | chart ...&lt;/P&gt;

&lt;P&gt;Or maybe something else entirely?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Laurent&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176302#M50635</guid>
      <dc:creator>lduchesne</dc:creator>
      <dc:date>2015-01-08T20:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my filtering search using a select drop-down value to improve performance?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176303#M50636</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;No idea why it is slower when putting field1=* in your search. It is supposedly same, based on my experience.&lt;/P&gt;

&lt;P&gt;Anyways you can achieve your objective by trying the below guide:&lt;/P&gt;

&lt;P&gt;On your dropdown box:&lt;BR /&gt;
 1. On "token Prefix" under "token options" input this: field1="&lt;BR /&gt;
 2. On "token suffix" under "token options" input this: "&lt;BR /&gt;
 3. Leave empty the value of "ALL" under static options.&lt;BR /&gt;
 4. Then click save.&lt;/P&gt;

&lt;P&gt;On the search inside your panel:&lt;BR /&gt;
index=… source=… $field1$ | chart ...&lt;/P&gt;

&lt;P&gt;Cheers...&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2015 03:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176303#M50636</guid>
      <dc:creator>jhlopez</dc:creator>
      <dc:date>2015-01-09T03:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my filtering search using a select drop-down value to improve performance?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176304#M50637</link>
      <description>&lt;P&gt;It is working perfect !!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2016 19:13:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-filtering-search-using-a-select-drop-down-value/m-p/176304#M50637</guid>
      <dc:creator>lakhanlal</dc:creator>
      <dc:date>2016-09-26T19:13:19Z</dc:date>
    </item>
  </channel>
</rss>

