fast-excel
fast-excel copied to clipboard
Fastexcel exporting only around 60k in production
I'm trying to export from DB around 300k rows.
In local it works fine but in production server, it only exports around 60k.
PHP 8.0.15 Laravel 8
I did some further testing.
It looks like when I select more than 5 columns I start to get reduced rows in the export.
It's only happening in productuction server not in local.
I have MYSQL 8 in server but MYSQL 5.7 in local. Could that be the reason?
Update: I tried with Mysql 8 same version as the server in local (windows 10).
And it still works fine on local.
It's really strange. What could be the issue?
Update: I followed @rap2hpoutre 's tutorial for the cursor method to export from collection.
When I try with cursor, I get this problem.
However, but when I try with lazy() function instead of cursor, I don't see this problem.
Is cursor() function the culprit here?
Hi!!
Ia have use cursor to generate 1millon of rows and run perfect.
I have this code:
foreach($data->cursor() as $lead) { yield $lead->setAppends([]); }
$data is a builder or 1millon of rows. Dont do get or somethind, create builder, and pass to the forearch with cursor. The use yield.
In 51second, using dowload method, i have a csv with 1millon of rows in mi dowload folder.
Hi!!
Ia have use cursor to generate 1millon of rows and run perfect.
I have this code:
foreach($data->cursor() as $lead) { yield $lead->setAppends([]); }
$data is a builder or 1millon of rows. Dont do get or somethind, create builder, and pass to the forearch with cursor. The use yield.
In 51second, using dowload method, i have a csv with 1millon of rows in mi dowload folder.
Hi, thanks for your reply.
With cursor I couldn't get all the rows to be exported for some reason. But in your code, I see you added "setAppends". Is this a vital part that will fix this issue?