explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Gx7

Settings
# exclusive inclusive rows x rows loops node
1. 0.270 489.584 ↑ 1.0 1 1

Aggregate (cost=3,484,939.47..3,484,939.48 rows=1 width=8) (actual time=489.584..489.584 rows=1 loops=1)

2. 7.916 489.314 ↑ 78.7 2,020 1

Hash Join (cost=3,357,989.26..3,484,144.16 rows=159,061 width=8) (actual time=405.969..489.314 rows=2,020 loops=1)

  • Hash Cond: (pxp.pxp_presid = pre.pre_id)
3. 18.674 431.516 ↑ 81.2 2,034 1

Hash Join (cost=3,353,079.53..3,474,253.06 rows=165,231 width=12) (actual time=355.599..431.516 rows=2,034 loops=1)

  • Hash Cond: (pro.pro_id = linp.linp_pedid)
4. 57.927 57.949 ↑ 1.0 65,475 1

Seq Scan on proyecto pro (cost=0.00..105,196.21 rows=65,982 width=4) (actual time=0.028..57.949 rows=65,475 loops=1)

  • Filter: ((((pro_grupo_seguimiento)::text = 'enprod'::text) OR (((pro_grupo_seguimiento)::text = 'acc'::text) AND ((pro_fecha_contacto >= '2019-02-01'::date) OR (pro_fecha_iniserv >= '2019-02-01'::date) OR (pro_fecha_ini >= '2019-02-01 00:00:00'::timestamp without time zone)))) AND ((pro_idalmacensalidaprevista IS NULL) OR (NOT (alternatives: SubPlan 3 or hashed SubPlan 4))))
  • Rows Removed by Filter: 18414
5.          

SubPlan (forSeq Scan)

6. 0.000 0.000 ↓ 0.0 0

Seq Scan on almacen almped (cost=0.00..1.12 rows=1 width=0) (never executed)

  • Filter: ((pro.pro_idalmacensalidaprevista = alm_id) AND (alm_endeposito = 1))
7. 0.022 0.022 ↓ 2.7 16 1

Seq Scan on almacen almped (cost=0.00..1.10 rows=6 width=4) (actual time=0.018..0.022 rows=16 loops=1)

  • Filter: (alm_endeposito = 1)
  • Rows Removed by Filter: 5
8. 1.300 354.893 ↑ 94.5 2,221 1

Hash (cost=3,349,430.58..3,349,430.58 rows=209,916 width=16) (actual time=354.893..354.893 rows=2,221 loops=1)

  • Buckets: 4096 Batches: 16 Memory Usage: 7kB
9. 0.436 353.593 ↑ 94.5 2,221 1

Hash Left Join (cost=3,326,234.62..3,349,430.58 rows=209,916 width=16) (actual time=166.300..353.593 rows=2,221 loops=1)

  • Hash Cond: (linp.linp_prodid = lpa.lpa_idpack)
10. 101.867 353.132 ↑ 94.5 2,221 1

Hash Join (cost=3,326,199.54..3,347,555.77 rows=209,916 width=16) (actual time=166.261..353.132 rows=2,221 loops=1)

  • Hash Cond: (pxp.pxp_linpid = linp.linp_id)
11. 85.816 85.816 ↑ 1.0 416,114 1

Seq Scan on productospres pxp (cost=0.00..12,405.04 rows=417,604 width=8) (actual time=0.011..85.816 rows=416,114 loops=1)

12. 1.454 165.449 ↑ 92.2 2,172 1

Hash (cost=3,322,717.91..3,322,717.91 rows=200,291 width=16) (actual time=165.449..165.449 rows=2,172 loops=1)

  • Buckets: 4096 Batches: 16 Memory Usage: 8kB
13. 163.898 163.995 ↑ 92.2 2,172 1

Seq Scan on lineaxpedido linp (cost=0.00..3,322,717.91 rows=200,291 width=16) (actual time=5.515..163.995 rows=2,172 loops=1)

  • Filter: ((linp_prodid = 8635) OR (alternatives: SubPlan 1 or hashed SubPlan 2))
  • Rows Removed by Filter: 396578
14.          

SubPlan (forSeq Scan)

15. 0.000 0.000 ↓ 0.0 0

Index Scan using lpaidpack_idx on linea_pack lpaaux (cost=0.00..8.27 rows=1 width=0) (never executed)

  • Index Cond: (linp.linp_prodid = lpa_idpack)
  • Filter: (lpa_idproducto = 8635)
16. 0.097 0.097 ↓ 1.1 15 1

Index Scan using lpaidproducto_idx on linea_pack lpaaux (cost=0.00..34.90 rows=14 width=4) (actual time=0.048..0.097 rows=15 loops=1)

  • Index Cond: (lpa_idproducto = 8635)
17. 0.009 0.025 ↓ 1.1 15 1

Hash (cost=34.90..34.90 rows=14 width=8) (actual time=0.025..0.025 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
18. 0.016 0.016 ↓ 1.1 15 1

Index Scan using lpaidproducto_idx on linea_pack lpa (cost=0.00..34.90 rows=14 width=8) (actual time=0.010..0.016 rows=15 loops=1)

  • Index Cond: (lpa_idproducto = 8635)
19. 14.992 49.882 ↑ 1.0 83,641 1

Hash (cost=3,520.39..3,520.39 rows=84,667 width=4) (actual time=49.882..49.882 rows=83,641 loops=1)

  • Buckets: 4096 Batches: 4 Memory Usage: 748kB
20. 34.890 34.890 ↑ 1.0 83,641 1

Seq Scan on presupuesto pre (cost=0.00..3,520.39 rows=84,667 width=4) (actual time=0.025..34.890 rows=83,641 loops=1)

  • Filter: (pre_activo = B'1'::"bit")
  • Rows Removed by Filter: 3265