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(988)

Our favourite Productivity Hacks 🔥

Our favourite Productivity Hacks 🔥

Scott and Wes - Do you sleep? How do you get so much done? You replied to me way too fast! We share our best productivity hot tips and the apps we use the GSD. Sponsor Freshbooks - Get 30 days free...

13 Syys 20171h

CSS in JS 💅👩‍🎤💁🚒 (Drama Free!)

CSS in JS 💅👩‍🎤💁🚒 (Drama Free!)

The most requested syntax episode ever! We break down CSS in JavaScript. Pros/Cons? What is it? What problems does it solve? What libraries should you use? Is it stupid or amazing? Sponsor Freshboo...

6 Syys 20171h 5min

Dang, that's handy! JavaScript Utility Libraries 🛠️

Dang, that's handy! JavaScript Utility Libraries 🛠️

Scott and talk all about different JavaScript utility libraries that make you say "Dang, that's handy!" Sponsor Freshbooks - Get 30 days free. Make sure to enter SYNTAX into the "How did you hear a...

30 Elo 201759min

Wes Bos Origin Story 🎸💼💻🔥🐷

Wes Bos Origin Story 🎸💼💻🔥🐷

In this episode, Wes talks about his career path from a MySpace customizer to where he is now. Sponsor Freshbooks - Get 30 days free. Make sure to enter SYNTAX into the "How did you hear about us" ...

23 Elo 201756min

Scott Tolinski Origin Story 🎧 📹 💻 🕺

Scott Tolinski Origin Story 🎧 📹 💻 🕺

In this episode, Scott talks about his unconventional career path and how to grow your career by working on what you love. Sponsor Freshbooks - Get 30 days free. Make sure to enter SYNTAX into the ...

16 Elo 201756min

Accepting Money on the Internet 💰💸

Accepting Money on the Internet 💰💸

In this episode we talk about how to accept money on the internet including the ups of Stripe, the downs of PayPal. Sponsor Freshbooks - Get 30 days free. Make sure to enter SYNTAX into the "How di...

9 Elo 20171h 3min

How to Slam Dunk Freelancing 🏀🤑

How to Slam Dunk Freelancing 🏀🤑

Sponsor Deliciousbrains WP Migrate DB Pro - Use the code SYNTAX for 20% off Show Notes Stickers - SOLD OUT MORE SOON Scott's Personal Website on Gatsby Gatsby Codealong Gatsby MJML Email Fra...

2 Elo 201758min

JavaScript Tooling - 004

JavaScript Tooling - 004

Show Notes Deliciousbrains WP Migrate DB Pro WesBos Website Level Up Tutorials WHY USE WWW? Webpack Babel ESLint Prettier Babili Prepack Sick Picks Figma Turn Ideas into Products Faster De...

26 Heinä 201749min

Suosittua kategoriassa Politiikka ja uutiset

uutiscast
aikalisa
politiikan-puskaradio
ootsa-kuullut-tasta-2
rss-ootsa-kuullut-tasta
tervo-halme
rss-vaalirankkurit-podcast
rss-podme-livebox
rss-asiastudio
et-sa-noin-voi-sanoo-esittaa
otetaan-yhdet
viisupodi
the-ulkopolitist
rikosmyytit
rss-tasta-on-kyse-ivan-puopolo-verkkouutiset
aihe
radio-antro
rss-hyvaa-huomenta-bryssel
rss-merja-mahkan-rahat
rss-kaikki-uusiksi