Tags
- 뷰
- Django
- 스택
- Queue
- DB
- regexp
- Vue
- migrations
- Article & User
- N:1
- 이진트리
- ORM
- 통계학
- Tree
- stack
- 트리
- count
- 큐
- 백트래킹
- 쟝고
- drf
- delete
- create
- distinct
- 완전검색
- SQL
- 그리디
- update
- M:N
- outer join
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Notice
Recent Posts
Link
목록2024/05/11 (1)
데이터 분석 기술 블로그
prefetch_relatedM:N 또는 N:1 역참조 관계에서 사용합니다. SQL이 아닌 Python을 사용한 JOIN을 진행합니다.문제 상황prefetch_related 적용문제를 해결해 봅니다.게시글을 조회하면서 참조된 댓글까지 한 번에 조회해서 가져옵니다.# views.pydef index_3(request): # articles = Article.objects.order_by('-pk') articles = Article.objects.prefetch_related('comment_set').order_by('-pk') context = { 'articles': articles, } return render(request, 'articles/index_3...
SW/DB
2024. 5. 11. 09:00