Global search on 1.5 mil records.

I have a mysql database with 1.5 million records in a table. When implementing a global search in filamentphp and checking the query it uses something like
select * from table where column like '%value%'
select * from table where column like '%value%'
and that causes mysql not to use indexes and the query takes 3.7 seconds on average. Is there a way to turn that functionality off either in Laravel or Filamentphp? I would be fine with
select * from table where column like 'value%'
select * from table where column like 'value%'
which would use indexes and the query takes < 100ms. OR is there a better solution for this?
1 Reply
Dennis Koch
Dennis Koch12mo ago
There should be methods to modify the global search query. Also you can swap the entire global search provider to use your own solution
Want results from more Discord servers?
Add your server