104: Jonathan Reinink - Pushing More Work to the Database

Full Stack Radio

Episode | Podcast

Date: Wed, 19 Dec 2018 16:16:00 +0000

<p>Topics include:</p><ul> <li>Issues you run into when you do too much work in code instead of in the database</li> <li>Why memory usage is just as important as query count</li> <li>How being smarter with your database usage can let you avoid hard problems like cache invalidation</li> <li>Denormalizing computable data to make it queryable</li> <li>Using "where not exists" strategically to improve query performance</li> <li>Why the solution to n+1 problems isn't always as simple as eager-loading</li> <li>How subqueries work and how you can use them to avoid memory problems when eager-loading</li> </ul><p>Sponsors:</p><ul> <li> <a href="https://ohdear.app">Oh Dear!</a>, sign up with the coupon code "FULLSTACKRADIO" to get 50% off your first month</li> <li> <a href="https://rollbar.com/fullstackradio">Rollbar</a>, sign up at https://rollbar.com/fullstackradio and install Rollbar in your app to receive a $100 gift card for <a href="https://opencollective.com/">Open Collective</a> </li> </ul><p>Links:</p><ul> <li><a href="https://refactoringui.com/book">Refactoring UI</a></li> <li> <a href="https://reinink.ca/articles/dynamic-relationships-in-laravel-using-subqueries">"Dynamic relationships in Laravel using subqueries"</a> on Jonathan's blog</li> <li> <a href="https://github.com/reinink/laracon2018">Source code</a> for Jonathan's Laracon Online talk</li> <li> <a href="https://stackoverflow.com/questions/173041/not-in-vs-not-exists">The benefits of NOT EXISTS</a> on StackOverflow</li> <li> <a href="https://github.com/reinink/advanced-eloquent">Advanced Eloquent</a>, Jonathan's Laravel package</li> </ul>