explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aUMG

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 1,174.720 ↑ 1.0 1 1

Aggregate (cost=1,796,875.20..1,796,875.21 rows=1 width=8) (actual time=1,174.720..1,174.720 rows=1 loops=1)

  • Functions: 32
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 4.474 ms, Inlining 10.478 ms, Optimization 433.489 ms, Emission 221.862 ms, Total 670.303 ms
2. 761.704 1,174.702 ↓ 0.0 0 1

Index Scan using idx_ecf_cupomcab_desconto_cupomcab on ecf_cupomcab c (cost=0.42..1,796,874.33 rows=346 width=4) (actual time=1,174.702..1,174.702 rows=0 loops=1)

  • Index Cond: (desconto_cupomcab = '0'::numeric)
  • Filter: (((status_cupom)::text = 'F'::text) AND (((SubPlan 1) + (SubPlan 2)) = '0'::numeric))
  • Rows Removed by Filter: 72913
3.          

SubPlan (for Index Scan)

4. 0.000 68.833 ↑ 1.0 1 68,833

Aggregate (cost=8.17..8.18 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=68,833)

5. 68.833 68.833 ↓ 0.0 0 68,833

Index Scan using fk_loja_cupomdetbico on ecf_cupomdet_bico (cost=0.14..8.17 rows=1 width=18) (actual time=0.001..0.001 rows=0 loops=68,833)

  • Index Cond: (loja_fk = c.loja_fk)
  • Filter: (((status_cupdetbic)::text = 'F'::text) AND (cupomcab_fk = c.id_cupomcab))
6. 137.666 344.165 ↑ 1.0 1 68,833

Aggregate (cost=16.35..16.36 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=68,833)

7. 206.499 206.499 ↑ 1.5 2 68,833

Index Scan using fk_cupomcab_cupomdetprod on ecf_cupomdet_prod (cost=0.42..16.34 rows=3 width=3) (actual time=0.002..0.003 rows=2 loops=68,833)

  • Index Cond: ((cupomcab_fk = c.id_cupomcab) AND (loja_fk = c.loja_fk))
  • Filter: ((status_cupitem)::text = 'F'::text)
  • Rows Removed by Filter: 0
Execution time : 1,179.348 ms