explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ch2b

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 54.418 ↑ 1.0 1 1

Aggregate (cost=313,271.64..313,271.65 rows=1 width=8) (actual time=54.418..54.418 rows=1 loops=1)

2. 54.392 54.411 ↓ 0.0 0 1

Index Scan using icontrato1 on contrato c (cost=0.43..313,271.63 rows=1 width=8) (actual time=54.411..54.411 rows=0 loops=1)

  • Index Cond: (procod = 28)
  • Filter: ((condatcad >= '2019-10-01'::date) AND (condatcad <= '2019-10-20'::date) AND (conati = 0) AND ((SubPlan 1) = 2))
  • Rows Removed by Filter: 66,282
3.          

SubPlan (for Index Scan)

4. 0.001 0.019 ↓ 0.0 0 1

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

5. 0.018 0.018 ↓ 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.018..0.018 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.295 ms
Execution time : 54.450 ms