explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B6I

Settings
# exclusive inclusive rows x rows loops node
1. 138.246 86,459.120 ↑ 36.7 339 1

GroupAggregate (cost=10,284.38..56,285,376.36 rows=12,458 width=397) (actual time=314.746..86,459.120 rows=339 loops=1)

  • Group Key: d1.codigo_pdt, d1.codigo_hpd, p.nombre_pdt, p.presen_pdt, f.nombre_fbc, p.regist_pdt, p.uniemp_pdt
2. 116.578 201.386 ↓ 2.2 27,141 1

Sort (cost=10,284.38..10,315.52 rows=12,458 width=182) (actual time=182.602..201.386 rows=27,141 loops=1)

  • Sort Key: d1.codigo_pdt, d1.codigo_hpd, p.nombre_pdt, p.presen_pdt, f.nombre_fbc, p.regist_pdt, p.uniemp_pdt
  • Sort Method: external merge Disk: 2576kB
3. 0.347 84.808 ↓ 2.2 27,141 1

Gather (cost=1,699.26..9,436.93 rows=12,458 width=182) (actual time=17.209..84.808 rows=27,141 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 5.025 84.461 ↓ 1.9 13,570 2

Hash Left Join (cost=699.26..7,191.13 rows=7,328 width=182) (actual time=14.347..84.461 rows=13,570 loops=2)

  • Hash Cond: (p.codigo_fbc = f.codigo_fbc)
5. 38.123 78.943 ↓ 1.9 13,570 2

Nested Loop (cost=670.83..7,070.26 rows=7,328 width=161) (actual time=13.835..78.943 rows=13,570 loops=2)

  • -> Index Scan using e_producto_nombre_pdt on e_producto p (cost=0.29..0.40 rows=1 width=142) (actual time=0.002..0.002 rows=1 lo
6. 27.212 40.820 ↓ 1.9 13,570 2

Hash Join (cost=670.53..4,158.94 rows=7,328 width=25) (actual time=13.761..40.820 rows=13,570 loops=2)

  • Hash Cond: (d1.codigo_ide = d.codigo_ide)
  • -> Parallel Seq Scan on e_ingrdepo1 d1 (cost=0.00..2633.87 rows=67687 width=26) (actual time=0.018..13.587 rows=53896 loop
  • Index Cond: (codigo_pdt = d1.codigo_pdt)
7. 13.608 13.608 ↑ 1.0 4,015 2

Hash (cost=620.06..620.06 rows=4,038 width=11) (actual time=13.608..13.608 rows=4,015 loops=2)

  • Buckets: 4096 Batches: 1 Memory Usage: 205kB
  • -> Bitmap Heap Scan on e_ingrdepo d (cost=79.58..620.06 rows=4038 width=11) (actual time=7.405..12.592 rows=4015 loo
  • Recheck Cond: (codigo_dau = '351'::numeric)
  • Heap Blocks: exact=362
  • -> Bitmap Index Scan on e_ingrdepo_tmp_codigo_dau (cost=0.00..78.58 rows=4038 width=0) (actual time=7.352..7.3
  • Index Cond: (codigo_dau = '351'::numeric)
8. 0.248 0.493 ↓ 1.0 909 2

Hash (cost=17.08..17.08 rows=908 width=33) (actual time=0.493..0.493 rows=909 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 68kB
9. 0.245 0.245 ↓ 1.0 909 2

Seq Scan on e_fabrican f (cost=0.00..17.08 rows=908 width=33) (actual time=0.015..0.245 rows=909 loops=2)

10.          

SubPlan (forGroupAggregate)

11. 4.407 86.784 ↑ 1.0 1 339

Aggregate (cost=1,128.81..1,128.82 rows=1 width=32) (actual time=0.256..0.256 rows=1 loops=339)

12. 29.017 82.377 ↓ 5.5 83 339

Hash Join (cost=685.97..1,128.77 rows=15 width=3) (actual time=0.086..0.243 rows=83 loops=339)

  • Hash Cond: (ei1.codigo_ide = ei.codigo_ide)
13. 39.663 50.511 ↓ 1.7 242 339

Bitmap Heap Scan on e_ingrdepo1 ei1 (cost=5.51..446.53 rows=141 width=9) (actual time=0.047..0.149 rows=242 loops=339)

  • Recheck Cond: (codigo_pdt = d1.codigo_pdt)
  • Heap Blocks: exact=49170
14. 10.848 10.848 ↓ 1.7 242 339

Bitmap Index Scan on e_ingrdepo1_codigo_pdt (cost=0.00..5.48 rows=141 width=0) (actual time=0.032..0.032 rows=242 loops=339)

  • Index Cond: (codigo_pdt = d1.codigo_pdt)
15. 0.836 2.849 ↑ 1.0 4,014 1

Hash (cost=630.15..630.15 rows=4,025 width=6) (actual time=2.849..2.849 rows=4,014 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 185kB
16. 2.013 2.013 ↑ 1.0 4,014 1

Bitmap Heap Scan on e_ingrdepo ei (cost=79.58..630.15 rows=4,025 width=6) (actual time=0.371..2.013 rows=4,014 loops=1)

  • Recheck Cond: (codigo_dau = '351'::numeric)
  • Filter: (codigo_est = '8'::numeric)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=362
  • -> Bitmap Index Scan on e_ingrdepo_tmp_codigo_dau (cost=0.00..78.58 rows=4038 width=0) (actual time=0.329..0.329 rows=4015 loo
  • Index Cond: (codigo_dau = '351'::numeric)
17. 4.407 86.106 ↑ 1.0 1 339

Aggregate (cost=1,128.81..1,128.82 rows=1 width=32) (actual time=0.254..0.254 rows=1 loops=339)

18. 28.853 81.699 ↓ 5.5 83 339

Hash Join (cost=685.97..1,128.77 rows=15 width=3) (actual time=0.085..0.241 rows=83 loops=339)

  • Hash Cond: (ei1_2.codigo_ide = ei_2.codigo_ide)
19. 38.985 50.172 ↓ 1.7 242 339

Bitmap Heap Scan on e_ingrdepo1 ei1_2 (cost=5.51..446.53 rows=141 width=9) (actual time=0.048..0.148 rows=242 loops=339)

  • Recheck Cond: (codigo_pdt = d1.codigo_pdt)
  • Heap Blocks: exact=49170
20. 11.187 11.187 ↓ 1.7 242 339

Bitmap Index Scan on e_ingrdepo1_codigo_pdt (cost=0.00..5.48 rows=141 width=0) (actual time=0.033..0.033 rows=242 loops=339)

  • Index Cond: (codigo_pdt = d1.codigo_pdt)
21. 0.843 2.674 ↑ 1.0 4,014 1

Hash (cost=630.15..630.15 rows=4,025 width=6) (actual time=2.674..2.674 rows=4,014 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 185kB
22. 1.831 1.831 ↑ 1.0 4,014 1

Bitmap Heap Scan on e_ingrdepo ei_2 (cost=79.58..630.15 rows=4,025 width=6) (actual time=0.378..1.831 rows=4,014 loops=1)

  • Recheck Cond: (codigo_dau = '351'::numeric)
  • Filter: (codigo_est = '8'::numeric)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=362
  • -> Bitmap Index Scan on e_ingrdepo_tmp_codigo_dau (cost=0.00..78.58 rows=4038 width=0) (actual time=0.338..0.338 rows=4015 loo
  • Index Cond: (codigo_dau = '351'::numeric)
23. 1.017 475.617 ↑ 1.0 1 339

Aggregate (cost=739.49..739.50 rows=1 width=32) (actual time=1.403..1.403 rows=1 loops=339)

24. 0.339 474.600 ↓ 0.0 0 339

Nested Loop (cost=79.00..739.49 rows=1 width=3) (actual time=1.400..1.400 rows=0 loops=339)

25. 461.040 461.040 ↑ 13.0 1 339

Bitmap Heap Scan on e_ingrdepo ei_4 (cost=78.58..629.15 rows=13 width=6) (actual time=1.325..1.360 rows=1 loops=339)

  • Recheck Cond: (codigo_dau = '351'::numeric)
  • Filter: (codigo_est = '4'::numeric)
  • Rows Removed by Filter: 4014
  • Heap Blocks: exact=122718
  • -> Bitmap Index Scan on e_ingrdepo_tmp_codigo_dau (cost=0.00..78.58 rows=4038 width=0) (actual time=0.292..0.292 rows=4015 loops=339
  • Index Cond: (codigo_dau = '351'::numeric)
26. 13.221 13.221 ↓ 0.0 0 339

Index Scan using e_ingrdepo1_pkey on e_ingrdepo1 ei1_4 (cost=0.42..8.48 rows=1 width=9) (actual time=0.039..0.039 rows=0 loops=339)

  • Index Cond: ((codigo_ide = ei_4.codigo_ide) AND (codigo_pdt = d1.codigo_pdt))
27. 1.017 895.977 ↑ 1.0 1 339

Aggregate (cost=409.37..409.38 rows=1 width=32) (actual time=2.643..2.643 rows=1 loops=339)

28. 0.678 894.960 ↓ 0.0 0 339

Nested Loop (cost=0.41..409.36 rows=1 width=4) (actual time=2.553..2.640 rows=0 loops=339)

29. 797.328 797.328 ↓ 13.0 13 339

Seq Scan on e_trasdepo ei_5 (cost=0.00..400.89 rows=1 width=5) (actual time=1.716..2.352 rows=13 loops=339)

  • Filter: ((codtde_dau = '351'::numeric) AND (codigo_est = '4'::numeric))
  • Rows Removed by Filter: 13065
30. 96.954 96.954 ↓ 0.0 0 4,407

Index Scan using e_trasdepo1_pkey on e_trasdepo1 ei1_5 (cost=0.41..8.46 rows=1 width=10) (actual time=0.022..0.022 rows=0 loops=4,407)

  • Index Cond: ((codigo_tde = ei_5.codigo_tde) AND (codigo_pdt = d1.codigo_pdt))
31. 79.116 42,406.176 ↑ 1.0 1 26,372

Aggregate (cost=555.27..555.28 rows=1 width=32) (actual time=1.608..1.608 rows=1 loops=26,372)

32. 6,540.256 42,327.060 ↓ 6.0 6 26,372

Nested Loop (cost=5.77..555.27 rows=1 width=3) (actual time=1.257..1.605 rows=6 loops=26,372)

  • -> Index Scan using e_ingrdepo_tmp_codigo_pdt on e_ingrdepo ei_3 (cost=0.29..8.31 rows=1 width=6) (actual time=0.002..0.002 rows=0 loops=2
33. 29,352.036 35,786.804 ↓ 7.3 95 26,372

Bitmap Heap Scan on e_ingrdepo1 ei1_3 (cost=5.48..447.20 rows=13 width=9) (actual time=0.665..1.357 rows=95 loops=26,372)

  • Recheck Cond: (codigo_pdt = d1.codigo_pdt)
  • Filter: ((canexi_ide > '0'::numeric) AND (vlcuni_ide > '0'::numeric))
  • Rows Removed by Filter: 1935
  • Heap Blocks: exact=23618348
  • Index Cond: (codigo_ide = ei1_3.codigo_ide)
  • Filter: ((codigo_dau = d.codigo_dau) AND (codigo_est = '8'::numeric))
  • Rows Removed by Filter: 1
34. 6,434.768 6,434.768 ↓ 14.4 2,030 26,372

Bitmap Index Scan on e_ingrdepo1_codigo_pdt (cost=0.00..5.48 rows=141 width=0) (actual time=0.244..0.244 rows=2,030 loops=26,372)

  • Index Cond: (codigo_pdt = d1.codigo_pdt)
35. 52.744 42,168.828 ↑ 1.0 1 26,372

Aggregate (cost=555.27..555.28 rows=1 width=32) (actual time=1.599..1.599 rows=1 loops=26,372)

36. 6,487.512 42,116.084 ↓ 6.0 6 26,372

Nested Loop (cost=5.77..555.27 rows=1 width=3) (actual time=1.250..1.597 rows=6 loops=26,372)

  • -> Index Scan using e_ingrdepo_tmp_codigo_pdt on e_ingrdepo ei_1 (cost=0.29..8.31 rows=1 width=6) (actual time=0.002..0.002 rows=0 loops=2
37. 29,193.804 35,628.572 ↓ 7.3 95 26,372

Bitmap Heap Scan on e_ingrdepo1 ei1_1 (cost=5.48..447.20 rows=13 width=9) (actual time=0.663..1.351 rows=95 loops=26,372)

  • Recheck Cond: (codigo_pdt = d1.codigo_pdt)
  • Filter: ((canexi_ide > '0'::numeric) AND (vlcuni_ide > '0'::numeric))
  • Rows Removed by Filter: 1935
  • Heap Blocks: exact=23618348
  • Index Cond: (codigo_ide = ei1_1.codigo_ide)
  • Filter: ((codigo_dau = d.codigo_dau) AND (codigo_est = '8'::numeric))
  • Rows Removed by Filter: 1
38. 6,434.768 6,434.768 ↓ 14.4 2,030 26,372

Bitmap Index Scan on e_ingrdepo1_codigo_pdt (cost=0.00..5.48 rows=141 width=0) (actual time=0.244..0.244 rows=2,030 loops=26,372)

  • Index Cond: (codigo_pdt = d1.codigo_pdt)