explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PUrx

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 42,748.450 ↑ 1.5 2 1

Sort (cost=2,786,927.04..2,786,927.04 rows=3 width=367) (actual time=42,748.446..42,748.450 rows=2 loops=1)

  • Sort Key: pre.dt_atualizacao
  • Sort Method: quicksort Memory: 26kB
  • Buffers: shared hit=836116
2. 271.150 42,748.403 ↑ 1.5 2 1

Merge Right Join (cost=525,770.57..2,786,927.01 rows=3 width=367) (actual time=26,392.674..42,748.403 rows=2 loops=1)

  • Merge Cond: ((prt.id_processo_trf)::integer = (trf.id_processo_trf)::integer)
  • Buffers: shared hit=836116
3. 1,160.906 8,403.872 ↑ 1.1 275,442 1

GroupAggregate (cost=96,873.25..905,589.33 rows=292,219 width=36) (actual time=5,039.952..8,403.872 rows=275,442 loops=1)

  • Group Key: prt.id_processo_trf
  • Buffers: shared hit=31405
4. 896.541 5,449.374 ↓ 1.1 334,255 1

Sort (cost=96,873.25..97,603.80 rows=292,219 width=33) (actual time=5,039.825..5,449.374 rows=334,255 loops=1)

  • Sort Key: prt.id_processo_trf
  • Sort Method: quicksort Memory: 41096kB
  • Buffers: shared hit=31405
5. 919.837 4,552.833 ↓ 1.1 335,934 1

Hash Join (cost=37,485.22..70,344.60 rows=292,219 width=33) (actual time=2,070.739..4,552.833 rows=335,934 loops=1)

  • Hash Cond: ((pp.id_processo_trf)::integer = (prt.id_processo_trf)::integer)
  • Buffers: shared hit=31405
6. 963.206 2,815.289 ↓ 1.1 335,934 1

Hash Join (cost=23,034.82..51,876.19 rows=292,219 width=32) (actual time=1,249.862..2,815.289 rows=335,934 loops=1)

  • Hash Cond: ((pp.id_pessoa)::integer = ul.id_usuario)
  • Buffers: shared hit=23755
7. 605.709 605.709 ↓ 1.1 335,934 1

Seq Scan on tb_processo_parte pp (cost=0.00..24,823.36 rows=292,219 width=8) (actual time=0.095..605.709 rows=335,934 loops=1)

  • Filter: (in_parte_principal AND (in_participacao = 'P'::bpchar))
  • Rows Removed by Filter: 761564
  • Buffers: shared hit=11068
8. 648.013 1,246.374 ↑ 1.0 450,249 1

Hash (cost=17,286.03..17,286.03 rows=459,903 width=32) (actual time=1,246.373..1,246.374 rows=450,249 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 33140kB
  • Buffers: shared hit=12687
9. 598.361 598.361 ↑ 1.0 450,249 1

Seq Scan on tb_usuario_login ul (cost=0.00..17,286.03 rows=459,903 width=32) (actual time=0.035..598.361 rows=450,249 loops=1)

  • Buffers: shared hit=12687
10. 417.703 817.707 ↓ 1.0 304,186 1

Hash (cost=10,672.40..10,672.40 rows=302,240 width=5) (actual time=817.706..817.707 rows=304,186 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 15088kB
  • Buffers: shared hit=7650
11. 400.004 400.004 ↓ 1.0 304,186 1

Seq Scan on tb_processo_trf prt (cost=0.00..10,672.40 rows=302,240 width=5) (actual time=0.041..400.004 rows=304,186 loops=1)

  • Buffers: shared hit=7650
12.          

SubPlan (for GroupAggregate)

13. 556.632 1,793.592 ↑ 1.0 1 61,848

Aggregate (cost=2.73..2.75 rows=1 width=32) (actual time=0.028..0.029 rows=1 loops=61,848)

14. 680.328 1,236.960 ↑ 23.5 4 61,848

Subquery Scan on a_1 (cost=0.00..2.26 rows=94 width=32) (actual time=0.006..0.020 rows=4 loops=61,848)

  • Filter: (a_1.nome <> ALL ('{DE,DA,DO,E,DAS,DOS}'::text[]))
  • Rows Removed by Filter: 1
15. 556.632 556.632 ↑ 20.0 5 61,848

Result (cost=0.00..0.51 rows=100 width=32) (actual time=0.004..0.009 rows=5 loops=61,848)

16. 0.030 34,073.381 ↑ 1.5 2 1

Materialize (cost=428,897.32..1,877,684.83 rows=3 width=385) (actual time=20,589.251..34,073.381 rows=2 loops=1)

  • Buffers: shared hit=804711
17. 288.116 34,073.351 ↑ 1.5 2 1

Merge Join (cost=428,897.32..1,877,684.82 rows=3 width=385) (actual time=20,589.232..34,073.351 rows=2 loops=1)

  • Merge Cond: ((pp_1.id_processo_trf)::integer = (pre.id_processo)::integer)
  • Buffers: shared hit=804711
18. 1,023.897 3,323.041 ↓ 1.2 293,698 1

GroupAggregate (cost=71,611.96..78,468.34 rows=239,308 width=36) (actual time=1,875.139..3,323.041 rows=293,698 loops=1)

  • Group Key: pp_1.id_processo_trf
  • Buffers: shared hit=11069
19. 918.240 2,299.144 ↑ 1.2 375,194 1

Sort (cost=71,611.96..72,700.88 rows=435,568 width=14) (actual time=1,875.043..2,299.144 rows=375,194 loops=1)

  • Sort Key: pp_1.id_processo_trf
  • Sort Method: quicksort Memory: 29962kB
  • Buffers: shared hit=11069
20. 777.192 1,380.904 ↑ 1.2 376,968 1

Hash Join (cost=3.07..30,815.49 rows=435,568 width=14) (actual time=0.337..1,380.904 rows=376,968 loops=1)

  • Hash Cond: ((pp_1.id_tipo_parte)::integer = (tp.id_tipo_parte)::integer)
  • Buffers: shared hit=11069
21. 603.475 603.475 ↑ 1.2 376,968 1

Seq Scan on tb_processo_parte pp_1 (cost=0.00..24,823.36 rows=435,568 width=8) (actual time=0.051..603.475 rows=376,968 loops=1)

  • Filter: (in_parte_principal AND (in_participacao = 'A'::bpchar))
  • Rows Removed by Filter: 720530
  • Buffers: shared hit=11068
22. 0.124 0.237 ↑ 1.0 92 1

Hash (cost=1.92..1.92 rows=92 width=14) (actual time=0.236..0.237 rows=92 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=1
23. 0.113 0.113 ↑ 1.0 92 1

Seq Scan on tb_tipo_parte tp (cost=0.00..1.92 rows=92 width=14) (actual time=0.018..0.113 rows=92 loops=1)

  • Buffers: shared hit=1
24. 0.035 30,462.194 ↑ 1.0 2 1

Materialize (cost=357,285.36..1,796,225.09 rows=2 width=365) (actual time=18,399.568..30,462.194 rows=2 loops=1)

  • Buffers: shared hit=793642
25. 114.837 30,462.159 ↑ 1.0 2 1

Merge Left Join (cost=357,285.36..1,796,225.08 rows=2 width=365) (actual time=18,399.548..30,462.159 rows=2 loops=1)

  • Merge Cond: ((trf.id_processo_trf)::integer = (pp_6.id_processo_trf)::integer)
  • Buffers: shared hit=793642
26. 278.064 26,414.839 ↑ 1.0 2 1

Merge Left Join (cost=260,402.54..1,698,049.42 rows=2 width=333) (actual time=15,314.122..26,414.839 rows=2 loops=1)

  • Merge Cond: ((trf.id_processo_trf)::integer = (pp_4.id_processo_trf)::integer)
  • Buffers: shared hit=529834
27. 279.302 18,307.437 ↑ 1.0 2 1

Merge Left Join (cost=150,018.15..1,585,740.93 rows=2 width=301) (actual time=9,572.734..18,307.437 rows=2 loops=1)

  • Merge Cond: ((trf.id_processo_trf)::integer = (pp_3.id_processo_trf)::integer)
  • Buffers: shared hit=419426
28. 1,069.691 14,524.977 ↑ 1.0 2 1

Nested Loop (cost=94,645.06..1,522,309.32 rows=2 width=269) (actual time=7,549.133..14,524.977 rows=2 loops=1)

  • Join Filter: ((pre.id_processo)::integer = (prt_1.id_processo_trf)::integer)
  • Rows Removed by Join Filter: 590486
  • Buffers: shared hit=408357
29. 1,498.579 9,912.358 ↑ 1.0 295,244 1

GroupAggregate (cost=94,644.21..1,331,490.24 rows=302,240 width=36) (actual time=3,306.711..9,912.358 rows=295,244 loops=1)

  • Group Key: prt_1.id_processo_trf
  • Buffers: shared hit=315813
30. 1,211.679 5,968.499 ↑ 1.2 376,968 1

Merge Join (cost=94,644.21..129,144.64 rows=435,568 width=33) (actual time=3,306.560..5,968.499 rows=376,968 loops=1)

  • Merge Cond: ((prt_1.id_processo_trf)::integer = (pp_2.id_processo_trf)::integer)
  • Buffers: shared hit=315813
31. 946.253 946.253 ↓ 1.0 304,183 1

Index Scan using tb_processo_trf_fk on tb_processo_trf prt_1 (cost=0.42..27,222.63 rows=302,240 width=5) (actual time=0.075..946.253 rows=304,183 loops=1)

  • Buffers: shared hit=292058
32. 1,020.823 3,810.567 ↑ 1.2 376,968 1

Sort (cost=94,643.71..95,732.63 rows=435,568 width=32) (actual time=3,306.427..3,810.567 rows=376,968 loops=1)

  • Sort Key: pp_2.id_processo_trf
  • Sort Method: quicksort Memory: 44037kB
  • Buffers: shared hit=23755
33. 1,018.235 2,789.744 ↑ 1.2 376,968 1

Hash Join (cost=23,034.82..53,847.24 rows=435,568 width=32) (actual time=1,158.965..2,789.744 rows=376,968 loops=1)

  • Hash Cond: ((pp_2.id_pessoa)::integer = ul_1.id_usuario)
  • Buffers: shared hit=23755
34. 613.552 613.552 ↑ 1.2 376,968 1

Seq Scan on tb_processo_parte pp_2 (cost=0.00..24,823.36 rows=435,568 width=8) (actual time=0.059..613.552 rows=376,968 loops=1)

  • Filter: (in_parte_principal AND (in_participacao = 'A'::bpchar))
  • Rows Removed by Filter: 720530
  • Buffers: shared hit=11068
35. 597.226 1,157.957 ↑ 1.0 450,249 1

Hash (cost=17,286.03..17,286.03 rows=459,903 width=32) (actual time=1,157.956..1,157.957 rows=450,249 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 33140kB
  • Buffers: shared hit=12687
36. 560.731 560.731 ↑ 1.0 450,249 1

Seq Scan on tb_usuario_login ul_1 (cost=0.00..17,286.03 rows=459,903 width=32) (actual time=0.029..560.731 rows=450,249 loops=1)

  • Buffers: shared hit=12687
37.          

SubPlan (for GroupAggregate)

38. 788.800 2,445.280 ↑ 1.0 1 78,880

Aggregate (cost=2.73..2.75 rows=1 width=32) (actual time=0.030..0.031 rows=1 loops=78,880)

39. 946.560 1,656.480 ↑ 23.5 4 78,880

Subquery Scan on a (cost=0.00..2.26 rows=94 width=32) (actual time=0.006..0.021 rows=4 loops=78,880)

  • Filter: (a.nome <> ALL ('{DE,DA,DO,E,DAS,DOS}'::text[]))
  • Rows Removed by Filter: 1
40. 709.920 709.920 ↑ 20.0 5 78,880

Result (cost=0.00..0.51 rows=100 width=32) (actual time=0.004..0.009 rows=5 loops=78,880)

41. 906.659 3,542.928 ↓ 2.0 2 295,244

Materialize (cost=0.84..183,263.08 rows=1 width=233) (actual time=0.010..0.012 rows=2 loops=295,244)

  • Buffers: shared hit=92544
42. 1.546 2,636.269 ↓ 2.0 2 1

Nested Loop (cost=0.84..183,263.07 rows=1 width=233) (actual time=2,609.041..2,636.269 rows=2 loops=1)

  • Join Filter: ((trf.id_classe_judicial)::integer = (clj.id_classe_judicial)::integer)
  • Rows Removed by Join Filter: 1462
  • Buffers: shared hit=92544
43. 10.959 2,633.219 ↓ 2.0 2 1

Nested Loop (cost=0.84..183,157.60 rows=1 width=209) (actual time=2,608.321..2,633.219 rows=2 loops=1)

  • Join Filter: ((juris.id_municipio)::integer = (muni.id_municipio)::integer)
  • Rows Removed by Join Filter: 11514
  • Buffers: shared hit=92366
44. 0.193 2,611.798 ↓ 2.0 2 1

Nested Loop (cost=0.84..182,984.23 rows=1 width=200) (actual time=2,604.646..2,611.798 rows=2 loops=1)

  • Join Filter: ((org.id_jurisdicao)::integer = (juris.id_jurisdicao)::integer)
  • Rows Removed by Join Filter: 190
  • Buffers: shared hit=92278
45. 0.398 2,611.375 ↓ 2.0 2 1

Nested Loop (cost=0.84..182,980.27 rows=1 width=200) (actual time=2,604.475..2,611.375 rows=2 loops=1)

  • Join Filter: ((trf.id_orgao_julgador)::integer = (org.id_orgao_julgador)::integer)
  • Rows Removed by Join Filter: 360
  • Buffers: shared hit=92276
46. 3.630 2,610.631 ↓ 2.0 2 1

Nested Loop (cost=0.84..182,971.20 rows=1 width=164) (actual time=2,604.161..2,610.631 rows=2 loops=1)

  • Join Filter: ((pre.id_evento)::integer = (eve.id_evento)::integer)
  • Rows Removed by Join Filter: 3804
  • Buffers: shared hit=92266
47. 0.090 2,601.974 ↓ 11.0 11 1

Nested Loop (cost=0.84..182,928.52 rows=1 width=92) (actual time=2,601.037..2,601.974 rows=11 loops=1)

  • Join Filter: ((pre.id_processo)::integer = (pro.id_processo)::integer)
  • Buffers: shared hit=91914
48. 0.185 2,601.741 ↓ 11.0 11 1

Nested Loop (cost=0.42..182,927.99 rows=1 width=62) (actual time=2,600.966..2,601.741 rows=11 loops=1)

  • Buffers: shared hit=91870
49. 2,601.358 2,601.358 ↓ 11.0 11 1

Seq Scan on tb_processo_evento pre (cost=0.00..182,919.54 rows=1 width=50) (actual time=2,600.791..2,601.358 rows=11 loops=1)

  • Filter: (in_visibilidade_externa AND ((dt_atualizacao)::timestamp without time zone <= now()) AND ((dt_atualizacao)::timestamp without time zone > (now( (...)
  • Rows Removed by Filter: 3906008
  • Buffers: shared hit=91826
50. 0.198 0.198 ↑ 1.0 1 11

Index Scan using idx_tb_processo_trf32 on tb_processo_trf trf (cost=0.42..8.44 rows=1 width=12) (actual time=0.017..0.018 rows=1 loops=11)

  • Index Cond: ((id_processo_trf)::integer = (pre.id_processo)::integer)
  • Buffers: shared hit=44
51. 0.143 0.143 ↑ 1.0 1 11

Index Scan using sys_c005762 on tb_processo pro (cost=0.42..0.51 rows=1 width=30) (actual time=0.011..0.013 rows=1 loops=11)

  • Index Cond: ((id_processo)::integer = (trf.id_processo_trf)::integer)
  • Buffers: shared hit=44
52. 5.027 5.027 ↑ 1.0 346 11

Seq Scan on tb_evento eve (cost=0.00..38.29 rows=351 width=80) (actual time=0.008..0.457 rows=346 loops=11)

  • Filter: (ds_caminho_completo ~~* 'Magistrado|%'::text)
  • Rows Removed by Filter: 157
  • Buffers: shared hit=352
53. 0.346 0.346 ↑ 1.0 181 2

Seq Scan on tb_orgao_julgador org (cost=0.00..6.81 rows=181 width=44) (actual time=0.007..0.173 rows=181 loops=2)

  • Buffers: shared hit=10
54. 0.230 0.230 ↑ 1.0 96 2

Seq Scan on tb_jurisdicao_municipio juris (cost=0.00..2.76 rows=96 width=8) (actual time=0.010..0.115 rows=96 loops=2)

  • Filter: in_sede
  • Rows Removed by Filter: 80
  • Buffers: shared hit=2
55. 10.462 10.462 ↓ 1.0 5,758 2

Seq Scan on tb_municipio muni (cost=0.00..101.50 rows=5,750 width=17) (actual time=0.006..5.231 rows=5,758 loops=2)

  • Buffers: shared hit=88
56. 1.504 1.504 ↑ 1.0 732 2

Seq Scan on tb_classe_judicial clj (cost=0.00..96.32 rows=732 width=32) (actual time=0.011..0.752 rows=732 loops=2)

  • Buffers: shared hit=178
57. 535.451 3,503.158 ↓ 1.4 275,442 1

Materialize (cost=55,373.09..62,942.69 rows=195,562 width=36) (actual time=1,642.297..3,503.158 rows=275,442 loops=1)

  • Buffers: shared hit=11069
58. 952.684 2,967.707 ↓ 1.4 275,442 1

GroupAggregate (cost=55,373.09..60,498.17 rows=195,562 width=36) (actual time=1,642.289..2,967.707 rows=275,442 loops=1)

  • Group Key: pp_3.id_processo_trf
  • Buffers: shared hit=11069
59. 800.547 2,015.023 ↓ 1.1 334,255 1

Sort (cost=55,373.09..56,103.64 rows=292,219 width=14) (actual time=1,642.208..2,015.023 rows=334,255 loops=1)

  • Sort Key: pp_3.id_processo_trf
  • Sort Method: quicksort Memory: 28221kB
  • Buffers: shared hit=11069
60. 678.418 1,214.476 ↓ 1.1 335,934 1

Hash Join (cost=3.07..28,844.44 rows=292,219 width=14) (actual time=0.301..1,214.476 rows=335,934 loops=1)

  • Hash Cond: ((pp_3.id_tipo_parte)::integer = (tp_1.id_tipo_parte)::integer)
  • Buffers: shared hit=11069
61. 535.843 535.843 ↓ 1.1 335,934 1

Seq Scan on tb_processo_parte pp_3 (cost=0.00..24,823.36 rows=292,219 width=8) (actual time=0.039..535.843 rows=335,934 loops=1)

  • Filter: (in_parte_principal AND (in_participacao = 'P'::bpchar))
  • Rows Removed by Filter: 761564
  • Buffers: shared hit=11068
62. 0.112 0.215 ↑ 1.0 92 1

Hash (cost=1.92..1.92 rows=92 width=14) (actual time=0.214..0.215 rows=92 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
  • Buffers: shared hit=1
63. 0.103 0.103 ↑ 1.0 92 1

Seq Scan on tb_tipo_parte tp_1 (cost=0.00..1.92 rows=92 width=14) (actual time=0.017..0.103 rows=92 loops=1)

  • Buffers: shared hit=1
64. 549.180 7,829.338 ↓ 1,324.5 264,905 1

Materialize (cost=110,384.39..112,307.98 rows=200 width=36) (actual time=5,206.009..7,829.338 rows=264,905 loops=1)

  • Buffers: shared hit=110408
65. 1,669.156 7,280.158 ↓ 1,324.5 264,905 1

GroupAggregate (cost=110,384.39..112,305.48 rows=200 width=36) (actual time=5,205.988..7,280.158 rows=264,905 loops=1)

  • Group Key: pp_4.id_processo_trf
  • Buffers: shared hit=110408
66. 875.647 5,611.002 ↓ 1.3 343,103 1

Sort (cost=110,384.39..111,023.75 rows=255,745 width=36) (actual time=5,205.737..5,611.002 rows=343,103 loops=1)

  • Sort Key: pp_4.id_processo_trf
  • Sort Method: quicksort Memory: 39660kB
  • Buffers: shared hit=110408
67. 618.075 4,735.355 ↓ 1.3 344,980 1

Append (cost=32,967.69..84,855.48 rows=255,745 width=36) (actual time=1,145.746..4,735.355 rows=344,980 loops=1)

  • Buffers: shared hit=110408
68. 614.010 2,109.026 ↓ 1.3 256,818 1

Hash Join (cost=32,967.69..49,276.22 rows=199,639 width=32) (actual time=1,145.741..2,109.026 rows=256,818 loops=1)

  • Hash Cond: ((pp_4.id_pessoa)::integer = ul_2.id_usuario)
  • Buffers: shared hit=25147
69. 352.098 390.284 ↓ 1.3 256,818 1

Bitmap Heap Scan on tb_processo_parte pp_4 (cost=9,932.88..23,496.36 rows=199,639 width=8) (actual time=39.959..390.284 rows=256,818 loops=1)

  • Recheck Cond: (in_participacao = 'A'::bpchar)
  • Filter: (NOT in_parte_principal)
  • Heap Blocks: exact=10566
  • Buffers: shared hit=12460
70. 38.186 38.186 ↓ 1.3 258,497 1

Bitmap Index Scan on idx_tb_processo_parte_painel (cost=0.00..9,882.97 rows=199,639 width=0) (actual time=38.185..38.186 rows=258,497 loops=1)

  • Index Cond: ((in_parte_principal = false) AND (in_participacao = 'A'::bpchar))
  • Buffers: shared hit=1894
71. 571.268 1,104.732 ↑ 1.0 450,249 1

Hash (cost=17,286.03..17,286.03 rows=459,903 width=32) (actual time=1,104.731..1,104.732 rows=450,249 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 33140kB
  • Buffers: shared hit=12687
72. 533.464 533.464 ↑ 1.0 450,249 1

Seq Scan on tb_usuario_login ul_2 (cost=0.00..17,286.03 rows=459,903 width=32) (actual time=0.070..533.464 rows=450,249 loops=1)

  • Buffers: shared hit=12687
73. 169.625 2,008.254 ↓ 1.6 88,162 1

Subquery Scan on *SELECT* 2 (cost=23,035.39..33,582.87 rows=56,106 width=36) (actual time=1,106.195..2,008.254 rows=88,162 loops=1)

  • Buffers: shared hit=85261
74. 253.096 1,838.629 ↓ 1.6 88,162 1

Hash Join (cost=23,035.39..33,021.81 rows=56,106 width=51) (actual time=1,106.188..1,838.629 rows=88,162 loops=1)

  • Hash Cond: ((pp_5.id_pessoa)::integer = ul_3.id_usuario)
  • Buffers: shared hit=85261
75. 182.057 482.939 ↓ 1.6 88,162 1

Merge Join (cost=0.57..9,215.54 rows=56,106 width=55) (actual time=0.173..482.939 rows=88,162 loops=1)

  • Merge Cond: ((pr.id_procuradoria)::integer = pp_5.id_procuradoria)
  • Buffers: shared hit=72574
76. 0.351 0.351 ↓ 1.0 165 1

Index Scan using tb_procuradoria_pkey on tb_procuradoria pr (cost=0.14..18.74 rows=159 width=51) (actual time=0.031..0.351 rows=165 loops=1)

  • Buffers: shared hit=48
77. 300.531 300.531 ↑ 4.9 88,163 1

Index Scan using tb_processo_parte_idx_proc on tb_processo_parte pp_5 (cost=0.43..67,731.65 rows=435,568 width=12) (actual time=0.126..300.531 rows=88,163 loops=1)

  • Filter: (in_parte_principal AND (in_participacao = 'A'::bpchar))
  • Rows Removed by Filter: 52900
  • Buffers: shared hit=72526
78. 559.703 1,102.594 ↑ 1.0 450,249 1

Hash (cost=17,286.03..17,286.03 rows=459,903 width=4) (actual time=1,102.593..1,102.594 rows=450,249 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 19926kB
  • Buffers: shared hit=12687
79. 542.891 542.891 ↑ 1.0 450,249 1

Seq Scan on tb_usuario_login ul_3 (cost=0.00..17,286.03 rows=459,903 width=4) (actual time=0.020..542.891 rows=450,249 loops=1)

  • Buffers: shared hit=12687
80. 219.909 3,932.483 ↓ 536.5 107,302 1

Materialize (cost=96,882.82..98,175.15 rows=200 width=36) (actual time=2,864.766..3,932.483 rows=107,302 loops=1)

  • Buffers: shared hit=263808
81. 676.340 3,712.574 ↓ 536.5 107,302 1

GroupAggregate (cost=96,882.82..98,172.65 rows=200 width=36) (actual time=2,864.755..3,712.574 rows=107,302 loops=1)

  • Group Key: pp_6.id_processo_trf
  • Buffers: shared hit=263808
82. 362.371 3,036.234 ↑ 1.3 135,198 1

Sort (cost=96,882.82..97,311.76 rows=171,577 width=36) (actual time=2,864.573..3,036.234 rows=135,198 loops=1)

  • Sort Key: pp_6.id_processo_trf
  • Sort Method: quicksort Memory: 17309kB
  • Buffers: shared hit=263808
83. 242.114 2,673.863 ↑ 1.3 135,734 1

Append (cost=32,951.27..80,249.72 rows=171,577 width=36) (actual time=1,163.593..2,673.863 rows=135,734 loops=1)

  • Buffers: shared hit=263808
84. 209.537 1,521.466 ↑ 1.5 88,139 1

Hash Join (cost=32,951.27..47,535.09 rows=133,936 width=32) (actual time=1,163.588..1,521.466 rows=88,139 loops=1)

  • Hash Cond: ((pp_6.id_pessoa)::integer = ul_4.id_usuario)
  • Buffers: shared hit=24345
85. 151.126 181.895 ↑ 1.5 88,139 1

Bitmap Heap Scan on tb_processo_parte pp_6 (cost=9,916.45..22,658.65 rows=133,936 width=8) (actual time=32.580..181.895 rows=88,139 loops=1)

  • Recheck Cond: (in_participacao = 'P'::bpchar)
  • Filter: (NOT in_parte_principal)
  • Heap Blocks: exact=9764
  • Buffers: shared hit=11658
86. 30.769 30.769 ↑ 1.5 88,533 1

Bitmap Index Scan on idx_tb_processo_parte_painel (cost=0.00..9,882.97 rows=133,936 width=0) (actual time=30.768..30.769 rows=88,533 loops=1)

  • Index Cond: ((in_parte_principal = false) AND (in_participacao = 'P'::bpchar))
  • Buffers: shared hit=1894
87. 577.185 1,130.034 ↑ 1.0 450,249 1

Hash (cost=17,286.03..17,286.03 rows=459,903 width=32) (actual time=1,130.033..1,130.034 rows=450,249 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 33140kB
  • Buffers: shared hit=12687
88. 552.849 552.849 ↑ 1.0 450,249 1

Seq Scan on tb_usuario_login ul_4 (cost=0.00..17,286.03 rows=459,903 width=32) (actual time=0.062..552.849 rows=450,249 loops=1)

  • Buffers: shared hit=12687
89. 87.914 910.283 ↓ 1.3 47,595 1

Subquery Scan on *SELECT* 2_1 (cost=0.99..31,375.27 rows=37,641 width=36) (actual time=0.178..910.283 rows=47,595 loops=1)

  • Buffers: shared hit=239463
90. 141.136 822.369 ↓ 1.3 47,595 1

Merge Join (cost=0.99..30,998.86 rows=37,641 width=51) (actual time=0.164..822.369 rows=47,595 loops=1)

  • Merge Cond: (pp_7.id_procuradoria = (pr_1.id_procuradoria)::integer)
  • Buffers: shared hit=239463
91. 171.368 636.182 ↑ 6.1 47,596 1

Nested Loop (cost=0.85..241,674.20 rows=292,219 width=8) (actual time=0.119..636.182 rows=47,596 loops=1)

  • Buffers: shared hit=239415
92. 226.834 226.834 ↑ 6.1 47,596 1

Index Scan using tb_processo_parte_idx_proc on tb_processo_parte pp_7 (cost=0.43..67,731.65 rows=292,219 width=12) (actual time=0.072..226.834 rows=47,596 loops=1)

  • Filter: (in_parte_principal AND (in_participacao = 'P'::bpchar))
  • Rows Removed by Filter: 93466
  • Buffers: shared hit=72525
93. 237.980 237.980 ↑ 1.0 1 47,596

Index Only Scan using tb_usuario_pkey on tb_usuario_login ul_5 (cost=0.42..0.59 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=47,596)

  • Index Cond: (id_usuario = (pp_7.id_pessoa)::integer)
  • Heap Fetches: 23743
  • Buffers: shared hit=166890
94. 44.683 45.051 ↓ 277.7 44,160 1

Materialize (cost=0.14..19.14 rows=159 width=51) (actual time=0.029..45.051 rows=44,160 loops=1)

  • Buffers: shared hit=48
95. 0.368 0.368 ↓ 1.0 165 1

Index Scan using tb_procuradoria_pkey on tb_procuradoria pr_1 (cost=0.14..18.74 rows=159 width=51) (actual time=0.018..0.368 rows=165 loops=1)

  • Buffers: shared hit=48