explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Lqo

Settings
# exclusive inclusive rows x rows loops node
1. 6,686.234 152,388.104 ↑ 25.7 3,142,256 1

Gather (cost=8,928,928.21..17,282,358.41 rows=80,607,200 width=132) (actual time=145,032.209..152,388.104 rows=3,142,256 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 1,128.803 145,701.870 ↑ 32.1 628,451 5 / 5

Parallel Hash Left Join (cost=8,927,928.21..9,220,638.41 rows=20,151,800 width=132) (actual time=144,926.000..145,701.870 rows=628,451 loops=5)

  • Hash Cond: ((pt.id_processo_trf)::integer = pi.id_processo)
3. 396.616 2,662.974 ↑ 1.3 628,451 5 / 5

Parallel Hash Left Join (cost=93,373.69..195,753.67 rows=785,625 width=80) (actual time=907.294..2,662.974 rows=628,451 loops=5)

  • Hash Cond: ((pt.id_processo_trf)::integer = (pc.id_processo_trf)::integer)
4. 493.777 1,824.583 ↑ 1.3 628,451 5 / 5

Parallel Hash Left Join (cost=70,627.88..170,945.60 rows=785,625 width=52) (actual time=465.022..1,824.583 rows=628,451 loops=5)

  • Hash Cond: ((pt.id_processo_trf)::integer = (p.id_processo)::integer)
5. 291.079 973.987 ↑ 1.3 628,451 5 / 5

Parallel Hash Left Join (cost=14,620.16..112,875.61 rows=785,625 width=44) (actual time=106.552..973.987 rows=628,451 loops=5)

  • Hash Cond: ((pt.id_processo_trf)::integer = (pr.id_processo_trf)::integer)
6. 438.739 631.715 ↑ 1.3 628,451 5 / 5

Parallel Hash Left Join (cost=7,967.26..96,328.73 rows=785,625 width=40) (actual time=55.267..631.715 rows=628,451 loops=5)

  • Hash Cond: ((pt.id_processo_trf)::integer = hdo.id_processo_trf)
7. 137.900 137.900 ↑ 1.3 628,451 5 / 5

Parallel Seq Scan on tb_processo_trf pt (cost=0.00..75,500.25 rows=785,625 width=36) (actual time=0.050..137.900 rows=628,451 loops=5)

8. 11.052 55.076 ↑ 1.5 25,772 5 / 5

Parallel Hash (cost=7,493.15..7,493.15 rows=37,929 width=8) (actual time=55.076..55.076 rows=25,772 loops=5)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 6656kB
9. 21.968 44.024 ↑ 1.5 25,772 5 / 5

Parallel Hash Anti Join (cost=3,424.17..7,493.15 rows=37,929 width=8) (actual time=17.949..44.024 rows=25,772 loops=5)

  • Hash Cond: (hdo.id_processo_trf = hdo2.id_processo_trf)
  • Join Filter: ((hdo2.dt_deslocamento < hdo.dt_deslocamento) OR ((hdo2.dt_deslocamento = hdo.dt_deslocamento) AND (hdo2.id_hist_desloca_oj < hdo.id_hist_desloca_oj)))
  • Rows Removed by Join Filter: 32840
10. 4.302 4.302 ↑ 2.9 29,030 5 / 5

Parallel Seq Scan on tb_hist_desloca_oj hdo (cost=0.00..2,357.41 rows=85,341 width=20) (actual time=0.019..4.302 rows=29,030 loops=5)

11. 9.552 17.754 ↑ 2.9 29,030 5 / 5

Parallel Hash (cost=2,357.41..2,357.41 rows=85,341 width=16) (actual time=17.754..17.754 rows=29,030 loops=5)

  • Buckets: 262144 Batches: 1 Memory Usage: 10080kB
12. 8.202 8.202 ↑ 2.9 29,030 5 / 5

Parallel Seq Scan on tb_hist_desloca_oj hdo2 (cost=0.00..2,357.41 rows=85,341 width=16) (actual time=0.075..8.202 rows=29,030 loops=5)

13. 8.798 51.193 ↑ 1.5 20,273 5 / 5

Parallel Hash (cost=6,284.55..6,284.55 rows=29,468 width=8) (actual time=51.193..51.193 rows=20,273 loops=5)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 5568kB
14. 16.755 42.395 ↑ 1.5 20,273 5 / 5

Parallel Hash Anti Join (cost=2,914.82..6,284.55 rows=29,468 width=8) (actual time=22.304..42.395 rows=20,273 loops=5)

  • Hash Cond: ((pr.id_processo_trf)::integer = (pr2.id_processo_trf)::integer)
  • Join Filter: (((pr2.dt_redistribuicao)::timestamp without time zone < (pr.dt_redistribuicao)::timestamp without time zone) OR (((pr2.dt_redistribuicao)::timestamp without time zone = (pr.dt_redistribuicao)::timestamp without time zone) AND ((pr2.id_processo_trf_redistribuicao)::integer < (pr.id_processo_trf_redistribuicao)::integer)))
  • Rows Removed by Join Filter: 25448
15. 3.466 3.466 ↑ 2.9 22,549 5 / 5

Parallel Seq Scan on tb_proc_trf_redistribuicao pr (cost=0.00..2,086.03 rows=66,303 width=20) (actual time=0.027..3.466 rows=22,549 loops=5)

16. 7.549 22.174 ↑ 2.9 22,549 5 / 5

Parallel Hash (cost=2,086.03..2,086.03 rows=66,303 width=16) (actual time=22.174..22.174 rows=22,549 loops=5)

  • Buckets: 131072 Batches: 1 Memory Usage: 7264kB
17. 14.625 14.625 ↑ 2.9 22,549 5 / 5

Parallel Seq Scan on tb_proc_trf_redistribuicao pr2 (cost=0.00..2,086.03 rows=66,303 width=16) (actual time=1.199..14.625 rows=22,549 loops=5)

18. 221.930 356.819 ↑ 1.2 628,496 5 / 5

Parallel Hash (cost=46,188.43..46,188.43 rows=785,543 width=12) (actual time=356.819..356.819 rows=628,496 loops=5)

  • Buckets: 4194304 Batches: 1 Memory Usage: 180320kB
19. 134.889 134.889 ↑ 1.2 628,496 5 / 5

Parallel Seq Scan on tb_processo p (cost=0.00..46,188.43 rows=785,543 width=12) (actual time=0.051..134.889 rows=628,496 loops=5)

20. 128.696 441.775 ↑ 1.6 128,238 5 / 5

Parallel Hash (cost=20,160.36..20,160.36 rows=206,836 width=32) (actual time=441.775..441.775 rows=128,238 loops=5)

  • Buckets: 1048576 Batches: 1 Memory Usage: 43264kB
21. 313.079 313.079 ↑ 1.6 128,238 5 / 5

Parallel Seq Scan on tb_processo_clet pc (cost=0.00..20,160.36 rows=206,836 width=32) (actual time=2.356..313.079 rows=128,238 loops=5)

22. 698.726 141,910.093 ↑ 34.7 581,263 5 / 5

Parallel Hash (cost=8,484,259.03..8,484,259.03 rows=20,151,800 width=12) (actual time=141,910.093..141,910.093 rows=581,263 loops=5)

  • Buckets: 16777216 Batches: 16 Memory Usage: 139648kB
23. 103,649.325 141,211.367 ↑ 34.7 581,263 5 / 5

Parallel Hash Anti Join (cost=4,533,764.30..8,484,259.03 rows=20,151,800 width=12) (actual time=89,883.753..141,211.367 rows=581,263 loops=5)

  • Hash Cond: (pi.id_processo = pi2.id_processo)
  • Join Filter: (ti2.create_ < ti.create_)
  • Rows Removed by Join Filter: 177774504
24. 27,242.523 37,562.042 ↑ 1.2 24,191,939 5 / 5

Parallel Hash Join (cost=421,598.96..3,586,722.09 rows=30,227,700 width=12) (actual time=5,464.572..37,562.042 rows=24,191,939 loops=5)

  • Hash Cond: (ti.procinst_ = pi.id_proc_inst)
25. 4,949.746 4,949.746 ↑ 1.2 24,193,261 5 / 5

Parallel Seq Scan on jbpm_taskinstance ti (cost=0.00..2,673,923.00 rows=30,227,700 width=16) (actual time=0.032..4,949.746 rows=24,193,261 loops=5)

26. 5,369.773 5,369.773 ↑ 1.3 6,988,293 5 / 5

Parallel Hash (cost=312,264.54..312,264.54 rows=8,746,754 width=12) (actual time=5,369.773..5,369.773 rows=6,988,293 loops=5)