r/PHPhelp • • Jul 24 '25

Need help to export large Data

Hi,

For one of our applications, we need to export large amounts of data from DB to a CSV file. About 2.5 M records in the DB table. At the csv file we need to dump 27 columns. We need to join about 7 tables.

We will use a job for exporting and after completion we shall send email notification to the user.

We are using Laravel 10 , my question is - can a CSV file hold 2.5M data? Even dump them, will the file be open able?

What will be the appropriate solution?

Thanks

6 Upvotes

34 comments sorted by

View all comments

Show parent comment

5

u/colshrapnel Jul 24 '25

I remember I was trying to open a file, about 200mb

Like I said above, it' a problem with a program you were using. On Ubuntu, you should have using less in the terminal, which would open any text file of any size without any problem.

1

u/OppieT Aug 02 '25

Or any flavor of Linux.