Severside searching takes more time to give a result

Severside searching takes more time to give a result

DharmarajDharmaraj Posts: 4Questions: 2Answers: 0

Hello Everyone,

I have more than 2M entries in database. I have given serverside true so each time 10 entries will be shown.

I am facing problem with searching, When I search a value , it will take more time to give a result.

Is there any alternative step for searching a value?

Thanks in advance.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @Dharmaraj ,

    What kind of times are you seeing? If it's particularly slow you could look at indexes on your database tables, a good index will significantly speed up queries.

    It would also be worth profiling your configuration to see where the lag is - is it on the receiving the search request, or the time to take for the DB to apply the search, or the time taken to package up the JSON request, or the time take to send it back to the client? There's a fair few moving parts, so you need to find out which is the culprit.

    Cheers,

    Colin

  • DharmarajDharmaraj Posts: 4Questions: 2Answers: 0

    Hello @Colin,

    If I put any character or whole string in search box, the time to receive search request will taking more time.

    As we are using search box to give result of matched characters.

    In my Controller(PHP code), I have used like operator to match search request and it will give result of matched request.

    In my PHP code, I have written ie., If search value is not empty then use like operator to search a value in database and give results.

    Thanks.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @Dharmaraj ,

    You could try enabling searchDelay - this will stop each key press from initiating a search.

    Cheers,

    Colin

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    If you are applying a "LIKE" query across every field in 2 million records, it is bound to appear slow.
    Perhaps individual column filters would be better.

This discussion has been closed.