Query Doctor Report
CRITICAL
N+1 detected: 25 queries for table "sample_project_author" (field: project_author)
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Add .select_related('project_author') to your queryset
Queries: 25 | Est. savings: ~40.5ms
CRITICAL
N+1 detected: 25 queries for table "sample_project_publisher" (field: project_publisher)
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Add .select_related('project_publisher') to your queryset
Queries: 25 | Est. savings: ~24.8ms
WARNING
Duplicate query: 5 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 5 | Est. savings: ~16.8ms
WARNING
Duplicate query: 5 identical queries for table "sample_project_publisher"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 5 | Est. savings: ~5.3ms
WARNING
Duplicate query: 4 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 4 | Est. savings: ~3.4ms
WARNING
Duplicate query: 6 identical queries for table "sample_project_publisher"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 6 | Est. savings: ~5.3ms
WARNING
Duplicate query: 7 identical queries for table "sample_project_publisher"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 7 | Est. savings: ~5.9ms
WARNING
Duplicate query: 2 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 2 | Est. savings: ~0.8ms
WARNING
Duplicate query: 4 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 4 | Est. savings: ~2.7ms
WARNING
Duplicate query: 5 identical queries for table "sample_project_publisher"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 5 | Est. savings: ~3.5ms
WARNING
Duplicate query: 2 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 2 | Est. savings: ~1.6ms
WARNING
Duplicate query: 3 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 3 | Est. savings: ~2.3ms
WARNING
Duplicate query: 4 identical queries for table "sample_project_author"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 4 | Est. savings: ~2.5ms
WARNING
Duplicate query: 2 identical queries for table "sample_project_publisher"
Location: C:\Users\hassa\Desktop\django-query-doctor\examples\sample_project\views.py:19 in book_list
return render(request, "books/list.html", {"books": books})
Fix: Assign the queryset result to a variable and reuse it instead of executing the same query multiple times
Queries: 2 | Est. savings: ~0.8ms