Django ORM ã® QuerySet ã«ã¯ãselect_related ããã³ prefetch_related ã¨ããã¡ã½ãããããã¾ãããã¤ãã¤ã使ãåæãããåãããªãã£ãããã¾ãã å ¬å¼ããã¥ã¡ã³ãã«ã¯ããæ¸ãã¦ããã¾ããã select_related works by creating an SQL join and including the fields of the related object in the SELECT statement. For this reason, select_related gets the related objects in the same database query. However, to avoid the much larger result set that would result from joining a
{{#tags}}- {{label}}
{{/tags}}