{{ query_pk }}
{% if qs_tracking.related %}
{{ qs_tracking.related|length }} related queries
{% endif %}
Model
{{ query.model }}
Num instances
{{ query.num_instances }}
Query type
{{ query.query_type }}
Average duration
{{ qs_tracking.average_duration|duration_in_ms }} ms
{% if qs_tracking.duplicate %}
Repeated
{{ qs_tracking.num_occurrences }} time(s)
{% endif %}
Cache hits
{{ query.cache_hits }}
{% if query.cache_hits %}
.__len__: {{ query.len_calls }}
.__bool__: {{ query.exists_calls }}
.__contains__: {{ query.contains_calls }}
{% endif %}
{% if query.field %}
Field
{{ query.field }}
{% endif %}
{% if query.iterable_class %}
{% if query.iterable_class == "ModelIterable" %}
{% if query.num_instances %}
Model attributes accessed
{% for attr, count in query.attributes_accessed.items %}
{{ attr }} - {{ count }}
{% endfor %}
{% endif %}
{% else %}
Iterable class
{{ query.iterable_class }}
{% endif %}
{% endif %}
{% if qs_tracking.related %}
{% for field, related_trackings in qs_tracking.related.items %}
{% for related_qs in related_trackings %}
{% include "dj_tracker/qs_tracking.html" with qs_tracking=related_qs query=related_qs.query query_pk=related_qs.query.pk %}
{% endfor %}