Reputation: 70
How Can I Improve loading more than 25 million rows in a single table. I have a datatable implementation, which require this type of compulsion. I already have other solutions with laravel. But Is this possible to improve my ajax request performance so my table can be loaded with data within 30-40 seconds?
My DataTable is loading data with an ajax call https://datatables.net/reference/option/ajax
Upvotes: 2
Views: 2594
Reputation: 33186
You shouldn't load all these records at once. This will be immensely slow and there isn't much you can do about that.
A solution for this is to implement Server-side processing. This way you can modify your database query on the server side to only load the records that should be displayed.
There are already several packages for Laravel that will build these queries for you. For example: yajra/laravel-datatables.
Upvotes: 2