I like to display 5 million roWs in feW seconds in table using Laravel 7
pls help

Recommended Answers

All 6 Replies

What display can show that many rows? Even the biggest JumboTron I've seen won't display more than a thousand rows!

Do you mean with page navigation? Or do you want to retrieve specific rows from a table of 5 million? Is your concern that your database query is too slow?

commented: yes madam display million records by pagination +0

What does your SQL query currently look like? Is speed your problem?

pumping 5 million rows is going to be a problem to do in a few seconds over any kind of network connection, and if it then needs to be parsed into some output format and then pushed over another network connection to yet another computer to display (worse still if it's going into a web browser) it's pretty much a lost cause.

Just getting the query executed and the results dumped onto the query console on the physical database server is going to probably take more than a few seconds (especially if it's a more than trivial query with more than 1-2 columns).

Jwenting, he says that he wants to do this with Laravel pagination, which is completely doable and reasonable.

We do it here on DaniWeb. We have a million user records. You can go to our members list and view them all, page by page, a hundred or so at a time, sorted.

Thanks Dani and Jwenting. I do want to share I had an encounter where a green web master was working hard on pagination and was trying to paginate the million returned rows from a SQL query. Maybe a short discussion on how to fetch a reasonable number of rows starting at which page (index?) is needed.

However, with a million records and say 100 per page that's 10,000 pages which I doubt the end user really wants that interface. Maybe another discussion about offering the user some option to search or refine the SQL search would also be needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.