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?
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')<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>
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
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
Hi @AntonyPriwin,
if you cannot have a limited list of values in the dropdown, you have only two choices:
With the second you're not sure to have a quick list, so I hint the first.
Ciao.
Giuseppe