At Laracon US in NYC last year, I announced that I was developing a video course completely focused on improving Laravel application performance by pushing more work to the database layer. I am excited to announce that this course, titled Eloquent Performance Patterns, is now available, and has already sold over 1,200 copies!
When I started working with PHP way back in the early 2000’s, my very first projects involved interacting with a MySQL database to get data, and dynamically generate pages. I remember feeling super empowered with it.
Fast-forward to today, and I still love building database-powered websites. Except these days, I do that all with Laravel and Eloquent, Laravel’s Active Record style ORM.
Over my career I’ve come to realize the incredible performance benefits of pushing more work into the database layer of my applications. This pursuit has led me to discover some powerful patterns that I now use daily in my Laravel projects to ensure they run super quick.
- Using subqueries to select, filter and order by related data.
- Creating dynamic relationships.
- Creating powerful full-text search features.
- Finding, filtering and ordering by geographical distances and areas.
- Optimizing circular relationships.
- Running authorization checks in the database.
- Calculating totals using conditional aggregates.
- Taking advantage of vendor-specific database features.
- Optimizing database queries in the perimeter.
- And more!
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.
Packages & Pricing
The course is available in two different packages: essentials and premium.
1. The Essentials Package
- Includes the first 22 lessons
- Just under 2 hours of video content
- Stream online or download videos
- Regular price: $149 USD
- Launch price: $99 USD (35% off)
2. The Premium Package
- Includes all lessons from the Essentials Package
- Plus 6 additional advanced lessons on natural sorting, full-text searching and geospatial queries
- Plus the full source code for all lessons, including MySQL, Postgres and SQLite versions (where possible)
- Over 2.2 hours of video content
- Stream online or download videos
- Regular price: $249 USD
- Launch price: $149 USD (40% off)
You’ll learn a ton from just the Essentials Package if you’re on a tighter budget, but having the source code for all the lessons, in three different database engine flavours, is well worth the extra if you can spare it…not to mention the six extra lessons, which are totally loaded!
Here’s a complete list of all the video lessons in the final course. I’ve worked really hard to maintain a good pace in each lesson. I want to be respectful of your time…and that means keeping things moving.
- Measuring your database performance (5:12)
- Minimizing memory usage by selecting only the required data (4:29)
- Getting one record from has-many relationships (9:43)
- Creating dynamic relationships using sub queries (6:09)
- Calculating totals using conditional aggregates (4:21)
- Optimizing circular relationships (4:25)
- Setting up multi-column searching (4:06)
- Getting LIKE to use an index (5:05)
- Faster options than whereHas (3:55)
- When it makes sense to run additional queries (3:07)
- Using UNIONs to run queries independently (7:58)
- Fuzzier searching using regular expressions (4:45)
- Running authorization policies in the database (6:04)
- Faster ordering using compound indexes (4:04)
- Ordering by has-one relationships (1:37)
- Ordering by belongs-to relationships (1:38)
- Ordering by has-many relationships (4:21)
- Ordering by belongs-to-many relationships (5:38)
- Ordering with NULLs always last (7:36)
- Ordering by custom algorithms (6:37)
- Filtering and sorting anniversary dates (7:04)
- Making N+1 issues impossible (3:23)
Premium Package only:
- Ordering data for humans using natural sort (4:20)
- Full text searching with rankings (5:06)
- Getting the distance between geographic points (3:22)
- Filtering by geographic distance (2:59)
- Ordering by geographic distance (1:25)
- Filtering by geospatial area (4:35)
If you’d like to see a couple of sample lessons from the course, simply visit the course website and drop in your email address and I’ll send you two free lessons:
- Faster ordering using compound indexes
- Filtering and sorting anniversary dates
In these lessons I show how using compound indexes can drastically speed up the ordering of multiple columns.
What people are saying
“In basically three lessons I have learned more about Eloquent that I have learned in 2 years on my own. Thank you!”
“After 5 minutes, @reinink’s Eloquent course already paid for itself – I just learned about the possibility to index a case statement.”
“Just purchased this course and watched a few lessons, and so far it looks AMAZING. Short, concise and straight to the point. Explains every concept with an example and I could already see ways to improve my future Laravel app. This course is a must-buy!”
“Crikey! Just implemented a couple of the first lessons from @reinink’s latest course on an app I’m building and the performance gains are unbelievable!”
“I’m about 10 episodes into @reinink’s Eloquent Performance Patterns course and it’s already paid for itself. So many practical examples that you can actually use in the real world. Excellent work, Jonathan!”
“Hey Jonathan! Congrats on the Eloquent course launch! It’s really, really good. I wish every course was like yours. Honestly, you’ve made a course that works for me. I’d say I’m more than comfortable with SQL, but converting it into Eloquent has always frustrated and confused me. If all of my school teachers taught like you, I’d have been so much smarter”
—James Brooks (employee at Laravel)
“I’ve been eagerly waiting for your Eloquent Performance Patterns course, and although I’m only on lesson 12, you’ve totally knocked it out of the park! It’s going to take me a while to wrap my head around the mini-series on fuzzier searching with unions to run queries independently, but thanks to you I can now watch and re-watch and dig into the source code of the lessons whenever I need.”
“The course is really good and it taught me several things that I didn’t know you could do with SQL, and I write SQL for a living.”
“Eloquent Performance Patterns course by @reinink is an awesome way to level up your SQL game! Even as an experienced Laravel developer, I have learned amazing tips, and I am only half way through it. Highly recommend!”
“I bought this course even though I don’t use Laravel in my day-to-day. There’s so much I’ve learned just from the pure SQL sections.”
“I’m just four videos into @reinink’s course and I’m already using dynamic relationships in a project I’m working on. This is definitely worth every cent.”
“Within five minutes of starting @reinink’s Eloquent Performance Patterns course, I’ve reduced a query time from 154ms to 6ms, and the number of models loaded from 544 to 63.”
How to Buy
Eloquent Performance Patterns is still available at a big launch discount right now, so it’s a great time to pick it up if you want to get it at the best possible price.
To buy it, simply visit the course website and select the package you want. I’m also offering discounts for teams of three developers or more.