Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dinni's avatar
Level 1

Export data from a table with huge entries

Hi, Need to make excel report of data using laravel. Its crashing every-time whenever i try to export data with more entries. I have around 30 million data in a table. Memory limit set is 128KB

0 likes
4 replies
jlrdw's avatar

Curious, why so much? Could you let the database do the work of the report then export the summaries.

What time frame does the report cover. I would normally do monthly, then combine some monthly reports into a quarterly.

dinni's avatar
Level 1

@jlrdw Could you let the database do the work of the report then export the summaries.

what exactly you mean?

Sinnbeck's avatar

Also make sure to do it in a command or job. Never do a task like this in a HTTP request

Please or to participate in this conversation.