I'm not sure If the correct example was demonstrated in this video. Is It necessary to use a chunk for such tasks or would it be better to use one SQL query for update? Example: UPDATE users SET email_verified_at = NOW() WHERE email_verified_at is null;
It is the correct example. Basically, when chunking you need to know if the column that you are chunking by is being updated inside the chunk closure or not. Also, if you have a lot of data in the table and you are directly update all the data at once, it can take down your whole website.
Hello bro I want to ask that: I am using xampp in Windows and my laravel debugbar shows 18 MB of ram in a fresh Project. Can give some solution PLEASE...
It depends on your laptop hardware configurations as well. And I have heard from many people xampp consumes more memory. I haven't used xampp and i can't tell you the exact answer. Sorry about that.
I made this error recently, end up check if there is still unfilled value the call the method to fill until everything is filled , instead of chunk by id of string column
Thanks for a good demonstration and visualization of the chunk's flaw. Have been a victim of it many times processing large datasets. Nice work!
Nice. Will the chunkById work for other types of id's - UUID for instance?
I don't think so since it uses greater that sign to compare the id as we have seen in the video.
good jobs 😊😊
I'm not sure If the correct example was demonstrated in this video. Is It necessary to use a chunk for such tasks or would it be better to use one SQL query for update?
Example: UPDATE users SET email_verified_at = NOW() WHERE email_verified_at is null;
It is the correct example. Basically, when chunking you need to know if the column that you are chunking by is being updated inside the chunk closure or not.
Also, if you have a lot of data in the table and you are directly update all the data at once, it can take down your whole website.
Hello bro I want to ask that:
I am using xampp in Windows and my laravel debugbar shows 18 MB of ram in a fresh Project.
Can give some solution PLEASE...
It depends on your laptop hardware configurations as well. And I have heard from many people xampp consumes more memory. I haven't used xampp and i can't tell you the exact answer. Sorry about that.
Try Laragon instead of xampp
I made this error recently, end up check if there is still unfilled value the call the method to fill until everything is filled , instead of chunk by id of string column
Thanks for sharing your experience 🙂