explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JjvX

Settings
# exclusive inclusive rows x rows loops node
1. 0.332 184.759 ↑ 1.0 1 1

Aggregate (cost=59,599.26..59,599.27 rows=1 width=8) (actual time=184.759..184.759 rows=1 loops=1)

2. 0.328 184.427 ↑ 1.6 2,020 1

Hash Left Join (cost=55,683.11..59,582.79 rows=3,293 width=8) (actual time=141.914..184.427 rows=2,020 loops=1)

  • Hash Cond: (linp.linp_prodid = lpa.lpa_idpack)
3. 11.014 184.029 ↑ 1.6 2,020 1

Hash Join (cost=55,648.03..59,518.85 rows=3,293 width=8) (actual time=141.828..184.029 rows=2,020 loops=1)

  • Hash Cond: (pre.pre_id = pxp.pxp_presid)
4. 31.323 31.323 ↑ 1.0 83,642 1

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

  • Filter: (pre_activo = B'1'::"bit")
  • Rows Removed by Filter: 3265
5. 0.567 141.692 ↑ 1.7 2,034 1

Hash (cost=55,605.27..55,605.27 rows=3,421 width=12) (actual time=141.692..141.692 rows=2,034 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
6. 57.253 141.125 ↑ 1.7 2,034 1

Hash Join (cost=40,555.99..55,605.27 rows=3,421 width=12) (actual time=24.864..141.125 rows=2,034 loops=1)

  • Hash Cond: (pxp.pxp_linpid = linp.linp_id)
7. 59.145 59.145 ↑ 1.0 416,115 1

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

8. 0.590 24.727 ↑ 1.6 2,032 1

Hash (cost=40,515.19..40,515.19 rows=3,264 width=12) (actual time=24.727..24.727 rows=2,032 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
9. 1.726 24.137 ↑ 1.6 2,032 1

Nested Loop (cost=157.43..40,515.19 rows=3,264 width=12) (actual time=0.567..24.137 rows=2,032 loops=1)

10. 8.986 9.379 ↑ 1.9 2,172 1

Bitmap Heap Scan on lineaxpedido linp (cost=157.43..10,748.60 rows=4,147 width=16) (actual time=0.546..9.379 rows=2,172 loops=1)

  • Recheck Cond: ((linp_prodid = 8635) OR (linp_prodid = ANY ('{9185,9232,9324,9368,9414,9637,10144,10158,10172,10186,10200,10214,12450,12932,13414}'::integer[])))
11. 0.001 0.393 ↓ 0.0 0 1

BitmapOr (cost=157.43..157.43 rows=4,157 width=0) (actual time=0.393..0.393 rows=0 loops=1)

12. 0.348 0.348 ↓ 1.0 2,181 1

Bitmap Index Scan on facturas_prodid (cost=0.00..76.30 rows=2,125 width=0) (actual time=0.348..0.348 rows=2,181 loops=1)

  • Index Cond: (linp_prodid = 8635)
13. 0.044 0.044 ↑ 2,032.0 1 1

Bitmap Index Scan on facturas_prodid (cost=0.00..79.06 rows=2,032 width=0) (actual time=0.044..0.044 rows=1 loops=1)

  • Index Cond: (linp_prodid = ANY ('{9185,9232,9324,9368,9414,9637,10144,10158,10172,10186,10200,10214,12450,12932,13414}'::integer[]))
14. 13.012 13.032 ↑ 1.0 1 2,172

Index Scan using proyecto_pkey on proyecto pro (cost=0.00..7.17 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=2,172)

  • Index Cond: (pro_id = linp.linp_pedid)
  • 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 1 or hashed SubPlan 2))))
  • Rows Removed by Filter: 0
15.          

SubPlan (forIndex Scan)

16. 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))
17. 0.020 0.020 ↓ 2.7 16 1

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

  • Filter: (alm_endeposito = 1)
  • Rows Removed by Filter: 5
18. 0.002 0.070 ↓ 1.1 15 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
19. 0.068 0.068 ↓ 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.036..0.068 rows=15 loops=1)

  • Index Cond: (lpa_idproducto = 8635)