{% extends "../../xhr.html" %}
{% block content %}
<h4><pre class="sql"><code>{{qual["where_clause"]}}</code></pre></h4>
<dl >
    <ul class="large-block-grid-3">
    <li>
    <dt>Executed:</dt><dd>{{qual["count"]}}</dd>
    </li>
    <li>
      <dt># of filtered tuples:</dt><dd>{{qual["nbfiltered"]}}</dd>
    <li>
    <dt>Filter ratio</dt><dd>{{"%.6g" % ( qual["filter_ratio"] ) }} % of tuples are removed by the filer.</dd>
    </li>
    <li>
    <dt>Other queries</dt><dd>
        {% if other_queries %}
        <ul class="unstyled">
            {% for md5query, query in other_queries.items() %}
            <li>
                <a data-url-has-params href="{{reverse_url_with_params("QueryOverview", url_args=[database, md5query])}}">
                <pre class="sql"><code>{{query}}</code></pre>
                </a>
            </li>
            {% end %}
        </ul>
        {% else %}
        (No other query used this qual )
        {% end %}
    </li>
    </ul>
</dl>
<ul class="large-block-grid-3">
{% for q in qual["quals"] %}
<li>
    <h5><pre class="sql"><code>{{q["repr"]}}</code></pre></h5>

    <dl>
        <ul class="large-block-grid-2">
        <li>
        <dt>Table</dt><dd>{{q["relname"]}}</dd>
        </li>
        <li>
        <dt>Column</dt><dd>{{q["attname"]}}</dd>
        </li>
        <li>
        <dt>Accesstype</dt><dd class="access-type-{{q['eval_type']}}">{{"Index" if q["eval_type"] == "i" else "After Scan"}}</dd>
        </li>
        </ul>
    </dl>
</li>
{% end %}
</ul>
{% end %}
