Eloquent Performance Patterns

Eloquent Performance Patterns

  • 28 videos
  • 04 h 00 min
  • Intermediate
  • $149.00

Overview

Performance issues suck. Customers are frustrated. Your servers are overloaded. Management is breathing down your neck.

You've already solved all your N+1 issues, added the necessary indexes, and you're even paying for the most expensive database server available. But despite all this, some things just feel impossible to build in a performant way.

So you invest months into different caching strategies to try and speed things up, but caching is hard. Every time you think you've solved a performance problem, you have a new caching problem to deal with instead.

I've been there and it sucks. So one day I decided “that's it, I'm going to figure out how to push all this work to the database if it kills me.” The results blew my mind.

By leveraging advanced database techniques, like sub queries, conditional aggregates, and aggressive use of scopes, pages that took 30+ seconds to load were now loading within 500ms!!

I've since spoken about Eloquent and database performance at both Laracon Online and Laracon US, and have written in-depth articles on the topic.

Eloquent Performance Patterns is a culmination of everything I've learned along my journey, distilled into a single course. We're going to dig deep into advanced real world problems. This isn't another Eloquent introduction course.

What you’ll learn 👇

  • The three key metrics to better database performance
  • The incredible power of sub queries
  • When to use joins vs sub queries
  • Using sub queries to select related data
  • Using sub queries to build dynamic relationships
  • Using sub queries to order by related data
  • Calculating totals using conditional aggregates
  • Running authorization policies in the database
  • Building complex search filters
  • Extending the query builder using macros
  • Demystifying database indexes
  • Introducing complex queries without sacrificing Eloquent's API
  • Leveraging vendor-specific (MySQL, Postgres, etc.) features
  • Caching and database denormalization
  • How to safely write raw database queries
  • Configuring Laravel to make N+1 issues impossible
  • Extending Eloquent to support ordering with NULLS LAST and NULLS FIRST
  • Getting the distance between two geographic points
  • Filtering by geographic distance
  • Ordering by geographic distance
  • Querying records within a physical area using geospatial shapes

Episodes

    Essentials Package

  • Measuring your database performance

    05:12

  • Minimizing memory usage by selecting only the required data

    04:09

  • Getting one record from has-many relationships

    09:43

  • Creating dynamic relationships using sub queries

    06:09

  • Calculating totals using conditional aggregates

    04:21

  • Optimizing circular relationships

    04:05

  • Setting up multi-column searching

    04:06

  • Getting LIKE to use an index

    05:05

  • Faster options than whereHas

    03:55

  • When it makes sense to run additional queries

    03:07

  • Using UNIONs to run queries independently

    07:58

  • Fuzzier searching using regular expressions

    04:35

  • Running authorization policies in the database

    06:04

  • Faster ordering using compound indexes

    04:04

  • Ordering by has-one relationships

    01:37

  • Ordering by belongs-to relationships

    01:38

  • Ordering by has-many relationships

    04:21

  • Ordering by belongs-to-many relationships

    05:38

  • Ordering with NULLs always last

    07:36

  • Ordering by custom algorithms

    06:37

  • Filtering and sorting anniversary dates

    07:04

  • Making N+1 issues impossible

    03:23

  • Premium Package

  • Ordering data for humans using natural sort

    04:20

  • Full text searching with rankings

    05:06

  • Getting the distance between geographic points

    03:22

  • Filtering by geographic distance

    02:59

  • Ordering by geographic distance

    01:22

  • Filtering by geospatial area

    04:35

Reviews

No review yet.

Author


Jonathan Reinink Profile Picture

Jonathan Reinink

Hello! My name is Jonathan Reinink. I work at Tailwind Labs where we build Tailwind CSS and Tailwind UI, among other things. I also run Church Social, an app that helps churches keep organized online. I am also active in the open source community. My latest contribution has been Inertia.js, a library that lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side frameworks like Laravel and Rails.