i know you would think, okay use the pagination. But if i need to use it in a ui.select2 or so that my users can search a really big database for adresses. I need a good workable solution.
What i have currently explodes everytime the memory or the php loading time.
I know i'm doing it to complicated, so there must be a laravel solution or a great package, which i can't find.
The can search on around 5 columns of each row the data.
I need it for a delivery system and they have to choose an adress i used the select ui plugin atm to have a searchable interface.
But the new database i received... has to many elements for the page to load in a fast way. I already thought of taking it onto another page... but then i have to rewrite the whole page.
is it somehow possible to have my app somehow put out the actual list like an API and when you enter a letter/word it automatically redoes a new search and calls the api?
In this cases I would use Elasticsearch and/or Redis. With a large dataset like yours making an autocomplete input "old-style" (by querying directly the database) might be a bit slow.
I had to deal with this. The problem was not selecting data with eloquent but displaying the table. A 20k row html table is too much for the browser.
I ended up doing a custom javascript that display only 20 rows of the table that get refreshed when the user scrolls.
Edit : hum ok you were talking about your database table not an html table :D. 20k rows should be absolutely no problem to search. No need for elasticsearch.