Optimize Your Django queries with select related, prefetch related and Django Debug Toolbar 👨🏻‍💻

preview_player
Показать описание
Simple introduction to optimizing Django queries with select related and prefetch related 🚀

In this tutorial, we will dive into two powerful tools in Django's ORM: select_related and prefetch_related. We will learn how to use these tools to optimize our database queries and improve the performance of our Django applications. You will learn about the differences between select_related and prefetch_related, when to use each of them, and how to apply them in real-world scenarios. By the end of the tutorial, you will have a solid understanding of select_related and prefetch_related and how to use them to optimize your Django queries

Consider subscribing if you are a coder or want to become one 🔥 👨🏻‍💻

Timeline:
00:00:00 - intro
00:00:22 - what has been created for this project
00:02:20 - install django debug toolbar
00:05:12 - adding objects to the db
00:07:10 - understanding the basics
00:09:52 - using select related to optimize queries
00:12:09 - using prefetch related to optimize queries
00:16:00 - using the Prefetch class with prefetch related

🔥 FREE Python Object Oriented Programming (OOP) pdf:

🔥 Join the Facebook group:

🔥 Follow pyplane on:

#pythondjango #djangotutorial #djangoproject

django, django orm, select_related django, prefetch_related django, django performance, django programming, django tutorial 2023, web development, django tips and tricks, django debug toolbar, django coding, django database, django querysets optimization, django performance optimization, django debug toolbar profiling, python django tutorial, python django
Рекомендации по теме
Комментарии
Автор

Hi Guys 1) hope you enjoyed the video, I did my best to explain these concepts but the renovation 3 floors below didn't help. Sorry if you hear some noises in the background (did my best to mute them). 2) The 4th part of the django and React native tutorial will be published next week 3) Have a lovely weekend 😉

Pyplane
Автор

How did YouTube know I was searching for this kind of video? I remember I wrote a comment somewhere that I need a video like this, just a day after I see this video? Wow.

gillesashley
Автор

This is very insightful and helpful, I wasn't aware of all the background queries being made without optimizing them. We need more optimization videos for Django.

tshiamomotshabi
Автор

Thank you for this amazing video. This is really helpful for me. I am watching your video last 2 years.

funnyvideotitk
Автор

Awesome as always and useful. Thanks 🙂

rangabharath
Автор

any difference in speed when looping an object in views and doing it in frontend jinja temp concept?

devmrnecro
Автор

Thanks, hope the renovation is finished now 😂

mohammedthiandoum
Автор

After print(posts.values()) I dont see the post.author.name values in the output? How is this being obtained in a single query?

mitchymagic
Автор

make tutorial on payement with stripe on subscription basis

anishghimire