Cache/speed up large select options array
I have a select where the user searches through the database and chooses from a list of 144000 cities, and usually the query takes around 2 seconds or so for a Select field query. Is there a way/any recommendations on how I could speed this up?
4 Replies
have you indexed the db column?
Which one? Can you please explain this a bit more?
Actually yes, sorry... I added the name of the city as an index, but I just found that there is a 1000ms debounce setting for the selects which only trigger the search after 1s, the query and result take les than 300ms.
You can change the debounce on the select using
->searchDebounce()
and then whatever number. I use 200Excellent, thank you!