Loading of data in the data table is taking 45 to 60 seconds long with server side processing

Loading of data in the data table is taking 45 to 60 seconds long with server side processing

Aravind_BodduAravind_Boddu Posts: 4Questions: 2Answers: 0

Hi, I've used server side processing to render 60K records into the data tables. My SQL query is taking 10 seconds to get all the records(60K records). But the rendering time is taking long like, 45 to 60 seconds. I've tested it in my local system in which it took 2 to 3 seconds to render. Whereas on server, its taking the above mentioned time. What would be the cause of this problem and how to solve this?

Answers

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    If you are using server-side processing, it shouldn’t be getting all of the records (unless you have paging disabled, in which case all server-side processing would be doing is adding network latency).

    With server-side processing enabled, it should be returning just 10 records at a time (or whatever your page size is).

    Beyond that, have a look at the Network tab in your browser’s inspector - does it show that the browser is waiting for the data from the server, or that it is taking a long time to download? If you link to the page in question I can take a look.

    Allan

  • Aravind_BodduAravind_Boddu Posts: 4Questions: 2Answers: 0

    The query I used is executed in 10 seconds in MySQL Work Bench. But when I use that same query to populate the data into server side processing data table, its taking like 60 seconds to display.

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

    You need to address Allan's points in detail.

  • Aravind_BodduAravind_Boddu Posts: 4Questions: 2Answers: 0
    edited June 2020

    @allan , I am using server side processing enabled in my code and YES, it's returning only 10 records. Query executing in less time. So YES, the browser is waiting for the response from the server.

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

    So YES, the browser is waiting for the response from the server.

    You'll need to look at the server logs then to understand why the server isn't responding to the request,

    Colin

This discussion has been closed.