{% extends "django_observatory/base.html" %}{% load observatory %} {% block title %}Database{% endblock %}{% block heading %}Database performance{% endblock %} {% block sub %}Totals count every query; the statement table is built from captured queries.{% endblock %} {% block tools %}{% include "django_observatory/_range.html" %}All captured SQL{% endblock %} {% block content %}
{% for t in tiles %}{% if t.href %}{% else %}
{% endif %}
{{ t.k }}
{{ t.v }}
{% if t.href %}
{% else %}
{% endif %}{% endfor %}
{% include "django_observatory/_chart.html" with title="Query latency" id="c-dbl" data=chart %} {% include "django_observatory/_chart.html" with title="Query volume" id="c-dbv" data=volume %} {% include "django_observatory/_chart.html" with title="Query duration distribution" note="all queries" id="c-dbd" data=distribution %} {% include "django_observatory/_hbars.html" with title="Heaviest statements" note="total time, captured queries" bars=heaviest mono=1 %}
{% include "django_observatory/_hbars.html" with title="Most executed statements" note="calls, captured queries" bars=most_called mono=1 %}

Statements by total time

{% for g in groups %} {% empty %}{% endfor %}
Statement (normalised)CallsAvgP95MaxTotalFlags
{{ g.sql|truncatechars:220 }}{% if g.route %}
e.g. from {{ g.route }}
{% endif %}
{{ g.calls }}{{ g.avg|ms }}{% if g.p95 != None %}{{ g.p95|ms }}{% else %}–{% endif %}{{ g.max|ms }}{{ g.total|ms }} {% if g.slow %}{{ g.slow }} slow{% endif %}{% if g.failed %} {{ g.failed }} failed{% endif %}
No queries captured in this time range.
{% endblock %}