leoraj's avatar

Efficient Loading of 50 Million Records in DataTable with Sub-2-Second Performance using Laravel 10

To load 5 crore (50 million) data entries into a DataTable using server-side rendering in Laravel 10 and achieve loading times within 1 or 2 seconds, if anyone knows how to do it, please assist me

0 likes
6 replies
Tray2's avatar

There is no way to do that, and why would you?

You need to paginate or chunk, but all 50M at less than 2 seconds, not do able.

1 like
Sinnbeck's avatar

I assume you want to paginate that data? If not, I don't see any way. Even excel can only handle 1 million rows

leoraj's avatar

@Sinnbeck

"I paginate the data. What I mean is, I have a dataset of 50 million transactions. When I list the transaction data on the admin panel, I display only 1000 entries at a time, along with the total data count. Now, when I click on a pagination number, I want to retrieve another set of 1000 records. Could you please assist me with this?"

In this version, the changes make it clear that clicking a pagination number triggers the retrieval of another 1000 records.

Tray2's avatar

@leoraj And you have the proper indexes on whatever you sort and filter on?

There is als an issue with pagination that you need to count all the rows everytime, unless you use simple pagination.

Please or to participate in this conversation.