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?

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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...

[Puzzles] Solve, Learn, Repeat: Dereferencing XML to Fixed-length events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...