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
awcodes
awcodes2y ago
have you indexed the db column?
ciorici
cioriciOP2y ago
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.
Kenneth Sese
Kenneth Sese2y ago
You can change the debounce on the select using ->searchDebounce() and then whatever number. I use 200
ciorici
cioriciOP2y ago
Excellent, thank you!
Want results from more Discord servers?
Add your server