explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GugS

Settings
# exclusive inclusive rows x rows loops node
1. 1,453,564.265 18,498,108.197 ↓ 0.0 0 1

Gather Merge (cost=54,140.70..54,144.43 rows=32 width=624) (actual time=18,497,821.249..18,498,108.197 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.154 17,044,543.932 ↓ 0.0 0 3 / 3

Sort (cost=53,140.67..53,140.71 rows=16 width=624) (actual time=17,044,543.932..17,044,543.932 rows=0 loops=3)

  • Sort Key: consultapr0_.id_processo_trf
  • Sort Method: quicksort Memory: 25kB
3. 2.408 17,044,543.778 ↓ 0.0 0 3 / 3

Nested Loop Semi Join (cost=3.90..53,140.35 rows=16 width=624) (actual time=17,044,543.777..17,044,543.778 rows=0 loops=3)

  • Join Filter: ((consultapr0_.id_processo_trf)::integer = (processopa2_.id_processo_trf)::integer)
4. 10.442 16,784.211 ↓ 5.0 421 3 / 3

Nested Loop (cost=0.85..48,713.11 rows=85 width=628) (actual time=3.682..16,784.211 rows=421 loops=3)

5. 16,746.511 16,746.511 ↓ 1.1 1,514 3 / 3

Parallel Index Scan using idx_tb_cab_proc_cd_status on tb_cabecalho_processo consultapr0_ (cost=0.43..45,566.77 rows=1,365 width=624) (actual time=0.516..16,746.511 rows=1,514 loops=3)

  • Index Cond: (cd_processo_status = 'E'::bpchar)
  • Filter: (in_inicial = 'G'::bpchar)
  • Rows Removed by Filter: 32418
6. 27.258 27.258 ↓ 0.0 0 4,543 / 3

Index Scan using tb_processo_trf_fk on tb_processo_trf processotr1_ (cost=0.43..2.31 rows=1 width=4) (actual time=0.018..0.018 rows=0 loops=4,543)

  • Index Cond: ((id_processo_trf)::integer = (consultapr0_.id_processo_trf)::integer)
  • Filter: ((id_localizacao_inicial)::integer = 1)
  • Rows Removed by Filter: 0
7. 7.073 17,027,757.159 ↓ 0.0 0 1,263 / 3

Nested Loop Semi Join (cost=3.04..52.07 rows=1 width=4) (actual time=40,445.979..40,445.979 rows=0 loops=1,263)

8. 364.586 364.586 ↑ 2.0 4 1,263 / 3

Index Scan using idx_tb_processo_parte_proc on tb_processo_parte processopa2_ (cost=0.43..1.37 rows=8 width=8) (actual time=0.811..0.866 rows=4 loops=1,263)

  • Index Cond: ((id_processo_trf)::integer = (processotr1_.id_processo_trf)::integer)
9. 3.555 17,027,385.500 ↓ 0.0 0 5,333 / 3

Nested Loop (cost=2.61..6.33 rows=1 width=20) (actual time=9,578.503..9,578.503 rows=0 loops=5,333)

10. 8.888 17,027,381.944 ↓ 0.0 0 5,333 / 3

Nested Loop (cost=2.18..5.87 rows=1 width=16) (actual time=9,578.501..9,578.501 rows=0 loops=5,333)

11. 2,015.874 2,015.874 ↑ 1.0 1 5,333 / 3

Index Only Scan using tb_pessoa_pkey on tb_pessoa pessoa5_ (cost=0.43..0.45 rows=1 width=4) (actual time=1.084..1.134 rows=1 loops=5,333)

  • Index Cond: (id_pessoa = (processopa2_.id_pessoa)::integer)
  • Heap Fetches: 7440
12. 2,045.868 17,025,357.182 ↓ 0.0 0 5,333 / 3

Nested Loop (cost=1.75..5.42 rows=1 width=12) (actual time=9,577.362..9,577.362 rows=0 loops=5,333)

13. 13,312.909 125,910.352 ↓ 3,331.0 3,331 5,333 / 3

Nested Loop (cost=1.33..4.89 rows=1 width=8) (actual time=2.490..70.829 rows=3,331 loops=5,333)

14. 6,527.592 47,470.811 ↓ 3,331.0 3,331 5,333 / 3

Hash Join (cost=0.90..4.43 rows=1 width=12) (actual time=2.462..26.704 rows=3,331 loops=5,333)

  • Hash Cond: ((processopa4_.id_pessoa)::integer = (pessoa5_1_.id_usuario)::integer)
  • Join Filter: ((pessoa5_.id_pessoa)::integer = (processopa4_.id_pessoa)::integer)
15. 37,933.629 37,933.629 ↓ 19.0 3,331 5,333 / 3

Index Scan using idx_pessoa on tb_processo_parte processopa4_ (cost=0.43..3.51 rows=175 width=8) (actual time=0.742..21.339 rows=3,331 loops=5,333)

  • Index Cond: ((id_pessoa)::integer = (processopa2_.id_pessoa)::integer)
16. 12.444 3,009.590 ↑ 1.0 1 5,333 / 3

Hash (cost=0.45..0.45 rows=1 width=4) (actual time=1.693..1.693 rows=1 loops=5,333)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 2,997.146 2,997.146 ↑ 1.0 1 5,333 / 3

Index Only Scan using tb_usuario_pkey on tb_usuario pessoa5_1_ (cost=0.43..0.45 rows=1 width=4) (actual time=1.684..1.686 rows=1 loops=5,333)

  • Index Cond: (id_usuario = (pessoa5_.id_pessoa)::integer)
  • Heap Fetches: 1919
18. 65,126.633 65,126.633 ↑ 1.0 1 17,761,809 / 3

Index Only Scan using tb_processo_trf_fk on tb_processo_trf processotr3_ (cost=0.43..0.45 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=17,761,809)

  • Index Cond: (id_processo_trf = (processopa4_.id_processo_trf)::integer)
  • Heap Fetches: 7108250
19. 16,897,400.962 16,897,400.962 ↓ 0.0 0 17,761,809 / 3

Index Scan using idx_tb_pessoa_doc_identificacao3 on tb_pess_doc_identificacao pessoadocu6_ (cost=0.43..0.52 rows=1 width=4) (actual time=2.854..2.854 rows=0 loops=17,761,809)

  • Index Cond: ((id_pessoa)::integer = (processopa4_.id_pessoa)::integer)
  • Filter: ((nr_documento_identificacao)::text = '025.443.714-12'::text)
  • Rows Removed by Filter: 211
20. 0.000 0.000 ↓ 0.0 0 / 3

Index Only Scan using tb_usuario_pkey on tb_usuario_login pessoa5_2_ (cost=0.43..0.45 rows=1 width=4) (never executed)

  • Index Cond: (id_usuario = (processopa4_.id_pessoa)::integer)
  • Heap Fetches: 0
Planning time : 170.048 ms
Execution time : 18,498,109.423 ms