Replies: 1 comment 1 reply
-
Hello! You can improve performance by trying the following approaches:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello community
I've recently started using Powergrid to replace another lib but i'm experiencing some performance issues when using the search.
I need to search across relationship and two huges requests are made with a lot of LIKE %search% for searcheable fields which lead to 50 seconds requests.
select count(*) as aggregate from
TABLEwhere ( (
TABLE.
motif_refus_manager` LIKE '%cindy%')or exists (select * from
JOINED_TABLE
whereTABLE
.field
=JOINED_TABLE
.field
andsearcheableField1
LIKE '%searchterm%')or exists (select * from
JOINED_TABLE
whereTABLE
.field
=JOINED_TABLE
.field
andsearcheableField2
LIKE '%searchterm%')or exists (select * from
JOINED_TABLE
whereTABLE
.field
=JOINED_TABLE
.field
andsearcheableField3
LIKE '%searchterm%')or exists (select * from
JOINED_TABLE
whereTABLE
.field
=JOINED_TABLE
.field
andsearcheableField4
LIKE '%searchterm%')or exists (select * from
JOINED_TABLE
whereTABLE
.field
=JOINED_TABLE
.field
andsearcheableField5
LIKE '%searchterm%'))`
I think this request is terrible and it's normal that it takes time, but then I ask myself, what can I do to improve this ?
Maybe it's coming from my datasource, currently i'm using Model::query()
Do I have to do a clean query in my datasource to handle a better search request ?
Beta Was this translation helpful? Give feedback.
All reactions