Laravel Chunking - You Might Be Doing This Wrong - Problem and Solution

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 11

  • @sleepyhead0123
    @sleepyhead0123 Рік тому

    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!

  • @flemmingwestphal6551
    @flemmingwestphal6551 3 роки тому +1

    Nice. Will the chunkById work for other types of id's - UUID for instance?

    • @Laratips
      @Laratips  2 роки тому +1

      I don't think so since it uses greater that sign to compare the id as we have seen in the video.

  • @mandankoding
    @mandankoding 2 роки тому

    good jobs 😊😊

  • @slisarenko
    @slisarenko 2 роки тому

    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;

    • @Laratips
      @Laratips  2 роки тому

      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.

  • @TechBuddy006
    @TechBuddy006 3 роки тому

    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...

    • @Laratips
      @Laratips  3 роки тому

      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.

    • @abdelwahabs.301
      @abdelwahabs.301 3 роки тому

      Try Laragon instead of xampp

  • @seyidtakele8158
    @seyidtakele8158 3 роки тому

    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

    • @Laratips
      @Laratips  3 роки тому

      Thanks for sharing your experience 🙂