I need to build search functionality in my website. So far I have implemented the query in eloquent. It is like this,
`$syukko = Syukko::where('category', $cat) ->where('status', 1) ->get();`
Now, this website may have a large database. My tester tested it and reported that, it was performing too slow. I tried to use paginate to show 20 results per page. Still the speed was not improving.
One colleague suggested me to use AJAX. My question is does AJAX search perform faster than basic eloquent in pgsql? (live search is not necessary)
Also, currently I don't have large database with my machine. I write the code and send it to tester. Can I use any tool to get query time in localhost?
#laravel #ajax #postgresql