{% 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>Seen:</dt><dd>{{qual.occurences}}</dd>
    </li>
    <li>
      <dt>Average evaluations by query</dt><dd>{{qual.execution_count / qual.occurences}}</dd>
      <dt>Average number of filtered tuples:</dt><dd>{{qual.avg_filter}}</dd>
    <li>
    <dt>Filter ratio</dt><dd>{{"%.6g" % ( qual.filter_ratio ) }} % of tuples are
    removed by the filter.</dd>
    </li>
    </ul>
</dl>
<ul class="large-block-grid-3">
{% for q in qual %}
<li>
    <h5><pre class="sql"><code>{{q}}</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 %}
