Hasty Treat - What is the n+1 problem?

Hasty Treat - What is the n+1 problem?

In this Hasty Treat, Scott and Wes talk about a common problem you’ll encounter in your development career — the n+1 problem. Hasura - Sponsor With Hasura, you can get a fully managed, production-ready GraphQL API as a service to help you build modern apps faster. You can get started for free in 30 seconds, or if you want to try out the Standard tier for zero cost, use the code “TryHasura” at this link: hasura.info. We’ve also got an amazing selection of GraphQL tutorials at hasura.io/learn. Sentry - Sponsor If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up. Show Notes 05:00 - What is the n+1 problem? The N+1 problem can happen in any language but is especially prevalent in GraphQL because it’s so easy to query relationships. 09:33 - The solution The solution to the n+1 problem is to batch the queries. As you loop over each podcast, keep an array of host IDs to lookup. Once you have looped over the podcasts, make a single query to the database with your large array of podcast host Ids. 11:11 - Should you care? Sometimes no: its often fine to do multiple DB Calls Facebook DataLoader Mercurious Many ORMs take care of this for you These then break it down into my appropriate SQL MongoDB Ruby: eager loading Laravel ORM does it Aggregation pipelines Prisma N+1: https://www.youtube.com/watch?v=7oMfBGEdwsc&vl=en Mongoose Populate Apollo Studio Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Jaksot(998)

Hosting & Servers — Heroku, Now, Galaxy, Digital Ocean, Linode, Docker, Netlify and more!

Hosting & Servers — Heroku, Now, Galaxy, Digital Ocean, Linode, Docker, Netlify and more!

Xojo — Sponsor Xojo is a cross-platform development tool for creating native apps for desktop, mobile, web and Raspberry Pi. With Xojo you really can write just one version of your app, say, on the M...

24 Tammi 201852min

Async + Await

Async + Await

Freshbooks — Sponsor If you are a small business or freelancer check out Freshbooks.com Cloud Accountingand get 30 days free. Make sure to enter SYNTAX into the "How did you hear about us" section. S...

17 Tammi 201854min

GraphQL? Here is what you need to know!

GraphQL? Here is what you need to know!

Snipcart — Sponsor Snipcart allows you to create online shopping carts without any backend work. It's entirely client-side which means it's the perfect fit for anyone building a SPA in React, Angular ...

10 Tammi 20181h 6min

All About Redux && Cookies vs JWT

All About Redux && Cookies vs JWT

Dev Lifts — Sponsor Dev Lifts will create a personal training plan tailored to your 2018 health and fitness goals. Use the code SYNTAX for $50 off. Join with a friend and we'll make you a Buddy Plan ...

3 Tammi 201826min

Dealing With Email Overload && Prettier Setups

Dealing With Email Overload && Prettier Setups

Wes details "Breakout" — his email management strategy for overwhelmed creatives and Scott and Wes chat about how they have their prettier setup. Freshbooks — Sponsor If you are a small business or f...

27 Joulu 201730min

All About CSS BEM!

All About CSS BEM!

Scott and Wes dive into CSS BEM — What is it? Why do you need it? How does it work? Sign up for D3 in 5 Days — Sponsor D3 has a bit of a bad reputation for being hard to learn so Ben Clinkinbeard has...

21 Joulu 201723min

Web Development in 2017 && a look ahead at 2018 🍾🍷

Web Development in 2017 && a look ahead at 2018 🍾🍷

What happened in web development in 2017? What were our personal and professional feats in 2017? What should we look forward to in 2018? Snipcart — Sponsor Snipcart allows you to create online shoppi...

13 Joulu 20171h 8min

Failure

Failure

Failure. How do you deal with it? How to learn from it? How do you know when you should give up vs keep pushing? Snipcart — Sponsor Snipcart allows you to create online shopping carts without any bac...

6 Joulu 20171h 8min

Suosittua kategoriassa Politiikka ja uutiset

uutiscast
aikalisa
ootsa-kuullut-tasta-2
politiikan-puskaradio
rss-ootsa-kuullut-tasta
tervo-halme
viisupodi
rss-podme-livebox
rss-vaalirankkurit-podcast
rss-pinnalla
otetaan-yhdet
the-ulkopolitist
aihe
rss-ulkopoditiikkaa
rss-raha-talous-ja-politiikka
rss-asiastudio
rss-girls-finish-f1rst
et-sa-noin-voi-sanoo-esittaa
rss-tasta-on-kyse-ivan-puopolo-verkkouutiset
rss-vain-talouselamaa