explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XZxo

Settings
# exclusive inclusive rows x rows loops node
1. 0.559 1,730.004 ↑ 1.0 1 1

Aggregate (cost=125,889.02..125,889.03 rows=1 width=8) (actual time=1,730.003..1,730.004 rows=1 loops=1)

2. 3.552 1,729.445 ↑ 202.0 1,246 1

Hash Join (cost=83,314.49..125,259.8 rows=251,689 width=4) (actual time=815.89..1,729.445 rows=1,246 loops=1)

3. 0.554 1,568.506 ↑ 201.6 1,246 1

Hash Join (cost=64,870.18..106,156.23 rows=251,141 width=16) (actual time=656.288..1,568.506 rows=1,246 loops=1)

  • Filter: ((NOT processopa1_.in_segredo) OR ((visualizad2_.id_pessoa)::integer = 35,203))
4. 3.222 1,567.937 ↑ 201.6 1,246 1

Hash Join (cost=64,869.16..105,213.42 rows=251,141 width=21) (actual time=656.246..1,567.937 rows=1,246 loops=1)

5. 376.994 1,409.623 ↑ 202.0 1,246 1

Hash Join (cost=43,598.35..83,281.92 rows=251,689 width=17) (actual time=499.3..1,409.623 rows=1,246 loops=1)

6. 168.433 713.611 ↓ 1.2 602,049 1

Hash Join (cost=17,443.86..55,744.68 rows=503,328 width=13) (actual time=178.215..713.611 rows=602,049 loops=1)

7. 367.521 367.521 ↓ 1.1 684,246 1

Seq Scan on tb_processo_parte processopa1_ (cost=0..36,620.15 rows=640,247 width=13) (actual time=0.031..367.521 rows=684,246 loops=1)

  • Filter: (in_parte_principal AND (in_situacao = 'A'::bpchar))
8. 30.430 177.657 ↓ 1.1 247,900 1

Hash (cost=14,610.47..14,610.47 rows=226,671 width=4) (actual time=177.657..177.657 rows=247,900 loops=1)

9. 147.227 147.227 ↓ 1.1 247,900 1

Seq Scan on tb_processo_trf processotr0_ (cost=0..14,610.47 rows=226,671 width=4) (actual time=0.014..147.227 rows=247,900 loops=1)

  • Filter: ((nr_identificacao_orgao_justica = '807'::numeric) AND (cd_processo_status = 'D'::bpchar) AND ((NOT in_segredo_justica) OR ((id_processo_trf)::integer = ANY ('{136281,171745,241083,247210,338269,155468}'::integer[]))))
10. 94.722 271.861 ↓ 1.0 475,529 1

Hash (cost=20,219.22..20,219.22 rows=474,822 width=32) (actual time=271.861..271.861 rows=475,529 loops=1)

11. 177.139 177.139 ↓ 1.0 475,529 1

Seq Scan on tb_usuario_login pessoa3_2_ (cost=0..20,219.22 rows=474,822 width=32) (actual time=0.036..177.139 rows=475,529 loops=1)

12.          

SubPlan (for Hash Join)

13. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=2.12..61.49 rows=1 width=0) (never executed)

14. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.69..60.97 rows=1 width=16) (never executed)

15. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=1.27..60.42 rows=1 width=12) (never executed)

16. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.85..57.35 rows=6 width=8) (never executed)

17. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_tb_processo_parte_proc on tb_processo_parte processopa4_ (cost=0.43..14.71 rows=6 width=4) (never executed)

  • Index Cond: ((id_processo_trf)::integer = (processotr0_.id_processo_trf)::integer)
  • Filter: (in_situacao = 'A'::bpchar)
18. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using tb_usuario_pkey on tb_usuario_login pessoafisi5_3_ (cost=0.42..7.11 rows=1 width=4) (never executed)

  • Index Cond: (id_usuario = (processopa4_.id_pessoa)::integer)
19. 0.000 0.000 ↓ 0.0 0 0

Index Scan using tb_pessoa_fisica_pkey on tb_pessoa_fisica pessoafisi5_ (cost=0.42..0.51 rows=1 width=4) (never executed)

  • Index Cond: ((id_pessoa_fisica)::integer = pessoafisi5_3_.id_usuario)
  • Filter: (lower(to_ascii((ds_nome_social)::text)) ~~ '%maria%aparecida%'::text)
20. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using tb_pessoa_pkey on tb_pessoa pessoafisi5_1_ (cost=0.42..0.54 rows=1 width=4) (never executed)

  • Index Cond: (id_pessoa = pessoafisi5_3_.id_usuario)
21. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using tb_usuario_pkey on tb_usuario pessoafisi5_2_ (cost=0.42..0.51 rows=1 width=4) (never executed)

  • Index Cond: (id_usuario = (pessoafisi5_1_.id_pessoa)::integer)
22. 15.561 47.157 ↓ 0.0 0 1

Gather (cost=1,001.7..10,602.1 rows=112 width=4) (actual time=46.95..47.157 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
23. 0.002 31.596 ↓ 0.0 0 3 / 3

Nested Loop (cost=1.7..9,590.9 rows=47 width=4) (actual time=31.596..31.596 rows=0 loops=3)

24. 0.000 31.594 ↓ 0.0 0 3 / 3

Nested Loop (cost=1.27..9,556.76 rows=17 width=16) (actual time=31.594..31.594 rows=0 loops=3)

25. 0.001 31.594 ↓ 0.0 0 3 / 3

Nested Loop (cost=0.84..9,547.87 rows=17 width=12) (actual time=31.593..31.594 rows=0 loops=3)

26. 0.003 31.593 ↓ 0.0 0 3 / 3

Nested Loop (cost=0.42..9,538.51 rows=17 width=8) (actual time=31.593..31.593 rows=0 loops=3)

27. 31.590 31.590 ↓ 0.0 0 3 / 3

Seq Scan on tb_pessoa_fisica pessoafisi5__1 (cost=0..9,423.22 rows=17 width=4) (actual time=31.59..31.59 rows=0 loops=3)

  • Filter: (lower(to_ascii((ds_nome_social)::text)) ~~ '%maria%aparecida%'::text)
28. 0.000 0.000 ↓ 0.0 0 0 / 3

Index Only Scan using tb_usuario_pkey on tb_usuario_login pessoafisi5_3__1 (cost=0.42..6.78 rows=1 width=4) (never executed)

  • Index Cond: (id_usuario = (pessoafisi5__1.id_pessoa_fisica)::integer)
29. 0.000 0.000 ↓ 0.0 0 0 / 3

Index Only Scan using tb_pessoa_pkey on tb_pessoa pessoafisi5_1__1 (cost=0.42..0.54 rows=1 width=4) (never executed)

  • Index Cond: (id_pessoa = pessoafisi5_3__1.id_usuario)
30. 0.000 0.000 ↓ 0.0 0 0 / 3

Index Only Scan using tb_usuario_pkey on tb_usuario pessoafisi5_2__1 (cost=0.42..0.51 rows=1 width=4) (never executed)

  • Index Cond: (id_usuario = (pessoafisi5_1__1.id_pessoa)::integer)
31. 0.000 0.000 ↓ 0.0 0 0 / 3

Index Scan using idx_pessoa on tb_processo_parte processopa4__1 (cost=0.43..1.61 rows=32 width=8) (never executed)

  • Index Cond: ((id_pessoa)::integer = (pessoafisi5_1__1.id_pessoa)::integer)
  • Filter: (in_situacao = 'A'::bpchar)
32. 63.519 155.092 ↑ 1.0 475,529 1

Hash (cost=15,322.58..15,322.58 rows=475,858 width=4) (actual time=155.092..155.092 rows=475,529 loops=1)

33. 91.573 91.573 ↑ 1.0 475,529 1

Seq Scan on tb_pessoa pessoa3_ (cost=0..15,322.58 rows=475,858 width=4) (actual time=0.014..91.573 rows=475,529 loops=1)

34. 0.007 0.015 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=8) (actual time=0.015..0.015 rows=1 loops=1)

35. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on tb_proc_parte_visib_sigilo visualizad2_ (cost=0..1.01 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1)

36. 73.459 157.387 ↓ 1.0 475,529 1

Hash (cost=12,501.36..12,501.36 rows=475,436 width=4) (actual time=157.387..157.387 rows=475,529 loops=1)

37. 83.928 83.928 ↓ 1.0 475,529 1

Seq Scan on tb_usuario pessoa3_1_ (cost=0..12,501.36 rows=475,436 width=4) (actual time=0.012..83.928 rows=475,529 loops=1)

Planning time : 27.569 ms
Execution time : 1,731.222 ms