Published 1 month ago by user_hkcl
Can someone provide complete code of server side processing of datatable.
Actually I have to display millions of record using datatable which takes so much time.
You're displaying millions of records at once or your database contains millions of records and you'll display a subset (page) at a time?
The wonderful thing about DataTables server side processing is that you don't have to display all of the records at once. Similarly, Laravel also supports collection pagination (https://laravel.com/docs/5.6/pagination).
Example from DataTables: https://datatables.net/examples/data_sources/server_side
Good tutorial for Laravel: https://shareurcodes.com/blog/laravel%20datatables%20server%20side%20processing
I have to display millions of record using datatable which takes so much time.
Even with pagination, 20 per page. And figure to quickly view what's on a page - 2 to 4 seconds, just to paginate through a million records =
You said millions, so lets say five million, then it would take:
That is 20 records per page. One per page would take 32 years.
So you better write a query to narrow the results.