explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cuaF : Optimization for: Optimization for: plan #OBAl; plan #qBcX

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 54.197 2,787.865 ↑ 30,042.7 15 1

Merge Join (cost=382,265.10..391,316.81 rows=450,641 width=200) (actual time=2,782.852..2,787.865 rows=15 loops=1)

  • Merge Cond: ((ii.interaccion_id = ir.interaccion_id) AND (ii.interaccion_item_id = ir.interaccion_item_id))
2. 109.110 2,267.327 ↑ 1.0 81,317 1

Sort (cost=253,105.37..253,313.00 rows=83,053 width=87) (actual time=2,252.480..2,267.327 rows=81,317 loops=1)

  • Sort Key: ii.interaccion_id, ii.interaccion_item_id
  • Sort Method: external merge Disk: 7520kB
3. 9.042 2,158.217 ↓ 1.0 84,650 1

Append (cost=0.00..242,343.21 rows=83,053 width=87) (actual time=2.963..2,158.217 rows=84,650 loops=1)

4. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on enco_interacciones_negocio_items ii (cost=0.00..0.00 rows=1 width=88) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((estado)::text = 'PENDIENTE'::text)
5. 2.905 2.905 ↓ 0.0 0 1

Seq Scan on enco_interacciones_negocio_items_errores ii_1 (cost=0.00..211.30 rows=1 width=176) (actual time=2.905..2.905 rows=0 loops=1)

  • Filter: ((estado)::text = 'PENDIENTE'::text)
  • Rows Removed by Filter: 8184
6. 1,416.081 1,416.081 ↓ 1.1 26,436 1

Seq Scan on enco_interacciones_negocio_items_2018 ii_2 (cost=0.00..148,670.44 rows=23,801 width=88) (actual time=0.054..1,416.081 rows=26,436 loops=1)

  • Filter: ((estado)::text = 'PENDIENTE'::text)
  • Rows Removed by Filter: 5866754
7. 730.186 730.186 ↑ 1.0 58,214 1

Seq Scan on enco_interacciones_negocio_items_2019 ii_3 (cost=0.00..93,461.48 rows=59,250 width=87) (actual time=0.050..730.186 rows=58,214 loops=1)

  • Filter: ((estado)::text = 'PENDIENTE'::text)
  • Rows Removed by Filter: 3123134
8. 25.962 466.341 ↓ 1.0 224,142 1

Materialize (cost=129,159.74..130,244.93 rows=217,038 width=125) (actual time=362.544..466.341 rows=224,142 loops=1)

9. 287.529 440.379 ↓ 1.0 224,142 1

Sort (cost=129,159.74..129,702.33 rows=217,038 width=125) (actual time=362.538..440.379 rows=224,142 loops=1)

  • Sort Key: ir.interaccion_id, ir.interaccion_item_id
  • Sort Method: external merge Disk: 30744kB
10. 18.186 152.850 ↓ 1.0 224,142 1

Append (cost=0.00..95,823.94 rows=217,038 width=125) (actual time=0.984..152.850 rows=224,142 loops=1)

11. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on enco_interacciones_negocio_roles ir (cost=0.00..0.00 rows=1 width=174) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: ((codigo_usuario_responsable)::text = 'ortizcr'::text)
12. 0.021 0.021 ↓ 0.0 0 1

Index Scan using enco_interacciones_negocio_roles_errores_resp_i on enco_interacciones_negocio_roles_errores ir_1 (cost=0.14..8.16 rows=1 width=350) (actual time=0.021..0.021 rows=0 loops=1)

  • Index Cond: ((codigo_usuario_responsable)::text = 'ortizcr'::text)
13. 7.819 8.331 ↓ 1.5 3,610 1

Bitmap Heap Scan on enco_interacciones_negocio_roles_2018 ir_2 (cost=63.68..8,892.67 rows=2,484 width=125) (actual time=0.953..8.331 rows=3,610 loops=1)

  • Recheck Cond: ((codigo_usuario_responsable)::text = 'ortizcr'::text)
  • Heap Blocks: exact=3417
14. 0.512 0.512 ↓ 1.5 3,610 1

Bitmap Index Scan on enco_interacciones_negocio_roles_2018_resp_i (cost=0.00..63.06 rows=2,484 width=0) (actual time=0.512..0.512 rows=3,610 loops=1)

  • Index Cond: ((codigo_usuario_responsable)::text = 'ortizcr'::text)
15. 106.557 126.305 ↓ 1.0 220,532 1

Bitmap Heap Scan on enco_interacciones_negocio_roles_2019 ir_3 (cost=5,591.21..86,923.11 rows=214,552 width=125) (actual time=21.451..126.305 rows=220,532 loops=1)

  • Recheck Cond: ((codigo_usuario_responsable)::text = 'ortizcr'::text)
  • Heap Blocks: exact=10929
16. 19.748 19.748 ↓ 1.0 220,586 1

Bitmap Index Scan on enco_interacciones_negocio_roles_2019_resp_i (cost=0.00..5,537.57 rows=214,552 width=0) (actual time=19.748..19.748 rows=220,586 loops=1)

  • Index Cond: ((codigo_usuario_responsable)::text = 'ortizcr'::text)