Dashboards & Visualizations

Drop-down selection is slow with large data

assadzakir
Loves-to-Learn Lots

we have tons of unique records per day,
so when I'm querying for the last 15 or last 30 days the dropdown is getting slow down.


Is there any solution like that when I will "TYPE" for the record which is starting with the word "ADF" on the dropdown and it should auto-populate with only the top 3 or top 5 records?

or Is there any other way to fix this dropdown performance issue?

Labels (1)
Tags (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could use a text input to modify a multiselect dropdown - when the text is less than 3 characters set the filter to head 1 (to hopefully speed up the query), otherwise set it to an appropriate where clause.

      <input type="text" token="keyprefix">
        <label>Select a key prefix</label>
        <change>
          <eval token="prefix_choice">if(isnull('form.keyprefix') OR len('form.keyprefix')&lt;3,"head 1","where like(key,\"".'form.keyprefix'."%\")")</eval>
        </change>
      </input>
      <input type="multiselect" token="key" searchWhenChanged="true">
        <label>Select a key</label>
        <search>
          <query>query | $prefix_choice$ | dedup key | fields key</query>
        </search>
        <fieldForLabel>key</fieldForLabel>
        <fieldForValue>key</fieldForValue>
        <prefix>(</prefix>
        <valuePrefix>key ="</valuePrefix>
        <valueSuffix>"</valueSuffix>
        <delimiter> OR </delimiter>
        <suffix>)</suffix>
      </input>
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @assadzakir,

there are many choices, the easiest is to schedule a night search that populates a lookup containing the values for the dropdown, then use the lookup in the dropdown search.

Ciao.

Giuseppe

0 Karma

AntonyPriwin
Explorer

Hello @gcusello ,

Hope you are doing good!

We tried the same by populating a lookup and querying from the lookup, as for a limited time range(e.g; last 5 days) we have nearly 6000 events flowing into the dropdown. For each click we need to wait for around 8 sec for the dropdown to show up.  is there any other way to load the dropdown faster.

Thanks,

Antony 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @AntonyPriwin,

if you cannot have a limited list of values in the dropdown, you have only two choices:

  • replace the dropdown with a text box;
  • use two dropdowns in chan: using the first (e.g. showing ranges: A-C, D-G, H-N, O-S, T-Z) to filter out the second.

With the second you're not sure to have a quick list, so I hint the first.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...