explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fP8r

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 82.646 ↑ 1.0 1 1

Aggregate (cost=57,799.81..57,799.82 rows=1 width=8) (actual time=82.646..82.646 rows=1 loops=1)

2. 0.011 82.637 ↓ 0.0 0 1

Nested Loop (cost=0.99..57,799.80 rows=1 width=8) (actual time=82.637..82.637 rows=0 loops=1)

3. 82.586 82.586 ↑ 1.0 1 1

Index Scan using icontrato1 on contrato c (cost=0.43..57,795.93 rows=1 width=28) (actual time=57.311..82.586 rows=1 loops=1)

  • Index Cond: (procod = 28)
  • Filter: ((condatcad >= '2019-10-01'::date) AND (condatcad <= '2019-10-20'::date) AND (conati = 0))
  • Rows Removed by Filter: 66,281
4. 0.001 0.040 ↓ 0.0 0 1

Subquery Scan on xs (cost=0.56..3.86 rows=1 width=0) (actual time=0.040..0.040 rows=0 loops=1)

  • Filter: (xs.retusucod = 2)
5. 0.003 0.039 ↓ 0.0 0 1

Limit (cost=0.56..3.85 rows=1 width=30) (actual time=0.039..0.039 rows=0 loops=1)

6. 0.036 0.036 ↓ 0.0 0 1

Index Scan Backward using retorno_iu0018 on retorno x (cost=0.56..3.85 rows=1 width=30) (actual time=0.036..0.036 rows=0 loops=1)

  • Index Cond: ((carcod = c.carcod) AND (devcod = c.devcod) AND (retdatinc < c.condatinc))
  • Filter: (sitcod = ANY ('{2,3}'::integer[]))
  • Rows Removed by Filter: 9
Planning time : 0.409 ms
Execution time : 82.688 ms