{% load i18n %}
{% trans "Scale simulation" %} {% trans "what-if · plan shape" %} {% blocktrans %}planner stats scaled in a rolled-back transaction — no data written, invisible to other sessions{% endblocktrans %}
{# Headline per factor: estimated cost / rows out of the top node. #}
{% for p in plans %}
{% if p.factor == 1 %}{% trans "now" %}{% else %}{{ p.factor }}×{% endif %}
{% blocktrans with n=p.plan.plan_rows|floatformat:0 %}rows {{ n }}{% endblocktrans %}
{% blocktrans with n=p.plan.total_cost|floatformat:0 %}cost {{ n }}{% endblocktrans %}
{% if not forloop.last %}
→
{% endif %} {% endfor %}
{% for step in steps %}
{% if step.a.factor == 1 %}{% trans "now" %}{% else %}{{ step.a.factor }}×{% endif %} → {{ step.b.factor }}× {% if step.diff.has_shape_change %} {% trans "plan changed" %} {% else %} {% trans "same shape" %} {% endif %}
{% include "partials/plan_diff_rows.html" with diff=step.diff %}
{% endfor %}

{% blocktrans %}Shows the plan's shape, not real runtime. Selectivity is held constant (uniform growth). Requires a superuser connection.{% endblocktrans %}