I have 5 Million record in my db . can i use data table ? its take too much time to loading ?

I have 5 Million record in my db . can i use data table ? its take too much time to loading ?

developer999developer999 Posts: 6Questions: 2Answers: 0

I am waiting for your reply. Please reply soo

Answers

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

    Use server-side processing.
    https://datatables.net/examples/data_sources/server_side.html

    Also look at the FAQs.

  • developer999developer999 Posts: 6Questions: 2Answers: 0

    No its not working . I does not want to set limit in my query . Is there any way to set limit in dataTable jquery that it will fetch data limit wise ?

  • allanallan Posts: 63,871Questions: 1Answers: 10,522 Site admin

    Yes, server-side processing will set the limit for the data that it requests from the server. The full documentation for it is available here.

    Fundamentally you have to set a limit in the query if you only want to load part of the data set on each request. If you don't want a limit then you will be requesting all 5 million rows. You can do that, but its going to crush both the bandwidth and processor of your client (and probably kill the memory on your server).

    Allan

  • allanallan Posts: 63,871Questions: 1Answers: 10,522 Site admin

    Indeed, per the other discussions you've commented on you are getting memory errors if you just try to load 5 million records. Not a big surprise really :smile:.

    Use server-side processing as both @tangerine and myself have suggested.

    Allan

This discussion has been closed.