Profiling for N+1 Queries - Build Expense Tracker App With PHP 8

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • In this video we learn about eager loading & how to fix n+1 problems. We use a tool called Clockwork to do the profiling.
    SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
    👍 Smash the like button
    🤝 Subscribe to the channel & turn the notifications on
    💬 Post comments, any feedback is greatly appreciated
    ⭐ Become a Patreon: / programwithgio
    THANK YOU!
    🛠️ TOOLS & SERVICES I USE
    Digital Ocean Hosting - Get 100$ credit - m.do.co/c/38b9...
    Domains on Namecheap - namecheap.pxf....
    Envato Elements - 1.envato.marke...
    LESSON P.23
    Starting Source Code - github.com/gge...
    Ending Source Code - github.com/gge...
    Course Outline - github.com/gge...
    Course Playlist - • Learn PHP The Right Wa...
    Clockwork - underground.wo...
    ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

КОМЕНТАРІ • 30

  • @khushisoni295
    @khushisoni295 Рік тому +4

    Please launch laravel course.....

    • @ProgramWithGio
      @ProgramWithGio  Рік тому +3

      I will start working on it once we finish the PHP series. Can't do it at the moment because I don't have a lot of free time unfortunately

    • @ProgramWithGio
      @ProgramWithGio  Рік тому +3

      @Muhammad Alsoofi about 10

  • @FGj-xj7rd
    @FGj-xj7rd Рік тому

    Eager loading saves the day.

  • @bakosyy
    @bakosyy 9 місяців тому

    Hi Gio. How do know what basically do clockwork's ->setStorage(), ->addDataSource() methods and what parameters it may potentially accept? I could not find those details in documentation and I am wondering how can we know such things?

    • @ProgramWithGio
      @ProgramWithGio  9 місяців тому

      hey, I'm not sure to be honest. You could inspect the source code and see

  • @Zubbee
    @Zubbee Рік тому +1

    Oh wow. This is great stuff Gio. Thank you so much!

  • @AnhNguyen-z5u8o
    @AnhNguyen-z5u8o Рік тому +1

    thank you so much, your work is freaking awesome

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

    nice

  • @free2idol1
    @free2idol1 11 місяців тому

    Hi Gio,
    Is this tool better than Laravel Debuggbar in terms of profiling for N+1?

    • @ProgramWithGio
      @ProgramWithGio  11 місяців тому +1

      Laravel Debugbar is for Laravel, Clockwork can be used in other frameworks as well. Debugbar is great for finding how many models are hydrated, also can find out n+1 problems, etc. I do prefer clockwork though & when I work in Laravel I also have telescope always installed

    • @free2idol1
      @free2idol1 11 місяців тому

      @@ProgramWithGio Thanks... Apart from Laravel and Slim, what are your preferred php framework? I understand Laravel is very popular but in which scenario you would NOT choose Laravel in your project?

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

    Hi Gio, this is new stuff. Being able to look into performance is amazing Gio. I see lazy loading functions too, I guess those also have advantages in its own way to help performance when working with large data. These adjustments really require careful thought. Thanks for this lesson Gio.

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

    Can you please make a video about this with vanilla php for has-many and many-to-many relationships? I'm not sure how to do it without a orm

    • @ProgramWithGio
      @ProgramWithGio  Рік тому +1

      We would essentially be building an ORM from scratch then if we start hydrating objects and implementing relationships between them.

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

    Wow

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

    Does this course replace buying a PHP course on Udemy?

    • @ProgramWithGio
      @ProgramWithGio  Рік тому +1

      I would hope so

    • @morteza55510
      @morteza55510 Рік тому +3

      Yes of course,
      I did watch a course about php in Udemy (about 30 to 40 hours), and I can say that this course is even better then the courses on Udemy

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

    Why do you use Brave bowser?

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

      Built in ad blocker & works better for me

    • @free2idol1
      @free2idol1 11 місяців тому

      @@ProgramWithGio is it developer friendly?

    • @ProgramWithGio
      @ProgramWithGio  11 місяців тому

      @@free2idol1 its chromium based so if you like chrome you will like brave as well.