explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t5ShP

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 32,507.898 ↑ 66.7 3 1

Sort (cost=9,342,871,735.41..9,342,871,735.91 rows=200 width=32) (actual time=32,507.898..32,507.898 rows=3 loops=1)

  • Sort Key: (CASE WHEN (((gravidade_pendencias.descricao)::text) IS NULL) THEN 'Não definida'::text ELSE ((gravidade_pendencias.descricao)::text) END)
  • Sort Method: quicksort Memory: 25kB
2. 2.350 32,507.887 ↑ 66.7 3 1

HashAggregate (cost=9,342,871,725.76..9,342,871,727.76 rows=200 width=32) (actual time=32,507.886..32,507.887 rows=3 loops=1)

3. 0.749 32,505.537 ↓ 2.5 10,219 1

Append (cost=100.05..9,342,871,665.39 rows=4,025 width=351) (actual time=1.349..32,505.537 rows=10,219 loops=1)

4. 1.035 2.533 ↓ 2.0 1,474 1

Hash Join (cost=100.05..177.00 rows=737 width=351) (actual time=1.349..2.533 rows=1,474 loops=1)

  • Hash Cond: (processo_principais.id = precatorios.processo_principal_id)
5. 0.163 0.163 ↑ 1.0 2,063 1

Seq Scan on processo_principais (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.005..0.163 rows=2,063 loops=1)

6. 0.529 1.335 ↑ 1.0 1,474 1

Hash (cost=81.63..81.63 rows=1,474 width=334) (actual time=1.335..1.335 rows=1,474 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 484kB
7. 0.196 0.806 ↑ 1.0 1,474 1

Nested Loop (cost=2.44..81.63 rows=1,474 width=334) (actual time=0.028..0.806 rows=1,474 loops=1)

8. 0.006 0.030 ↑ 1.0 1 1

Nested Loop (cost=2.44..4.82 rows=1 width=318) (actual time=0.025..0.030 rows=1 loops=1)

  • Join Filter: (tipo_pendencias.gravidade_pendencia_id = gravidade_pendencias.id)
  • Rows Removed by Join Filter: 2
9. 0.009 0.023 ↑ 1.0 1 1

Hash Join (cost=2.44..3.75 rows=1 width=308) (actual time=0.019..0.023 rows=1 loops=1)

  • Hash Cond: (telas.id = tipo_pendencias.telas_id)
10. 0.004 0.004 ↓ 1.0 23 1

Seq Scan on telas (cost=0.00..1.22 rows=22 width=42) (actual time=0.002..0.004 rows=23 loops=1)

11. 0.002 0.010 ↑ 1.0 1 1

Hash (cost=2.42..2.42 rows=1 width=274) (actual time=0.010..0.010 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
12. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on tipo_pendencias (cost=0.00..2.42 rows=1 width=274) (actual time=0.005..0.008 rows=1 loops=1)

  • Filter: (id = 1)
  • Rows Removed by Filter: 20
13. 0.001 0.001 ↑ 1.0 3 1

Seq Scan on gravidade_pendencias (cost=0.00..1.03 rows=3 width=14) (actual time=0.001..0.001 rows=3 loops=1)

14. 0.580 0.580 ↑ 1.0 1,474 1

Seq Scan on precatorios (cost=0.00..62.07 rows=1,474 width=16) (actual time=0.002..0.580 rows=1,474 loops=1)

  • Filter: revisao_pendente
  • Rows Removed by Filter: 433
15. 1.007 3.770 ↓ 3.3 1,578 1

Hash Join (cost=80.85..4,289.47 rows=477 width=351) (actual time=0.623..3.770 rows=1,578 loops=1)

  • Hash Cond: (precatorios_1.processo_principal_id = processo_principais_1.id)
16. 0.254 2.180 ↓ 1.7 1,578 1

Nested Loop (cost=2.44..4,195.55 rows=954 width=334) (actual time=0.032..2.180 rows=1,578 loops=1)

17. 0.004 0.024 ↑ 1.0 1 1

Nested Loop (cost=2.44..4.82 rows=1 width=318) (actual time=0.020..0.024 rows=1 loops=1)

  • Join Filter: (tipo_pendencias_1.gravidade_pendencia_id = gravidade_pendencias_1.id)
  • Rows Removed by Join Filter: 2
18. 0.010 0.018 ↑ 1.0 1 1

Hash Join (cost=2.44..3.75 rows=1 width=308) (actual time=0.015..0.018 rows=1 loops=1)

  • Hash Cond: (telas_1.id = tipo_pendencias_1.telas_id)
19. 0.002 0.002 ↓ 1.0 23 1

Seq Scan on telas telas_1 (cost=0.00..1.22 rows=22 width=42) (actual time=0.001..0.002 rows=23 loops=1)

20. 0.001 0.006 ↑ 1.0 1 1

Hash (cost=2.42..2.42 rows=1 width=274) (actual time=0.006..0.006 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
21. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on tipo_pendencias tipo_pendencias_1 (cost=0.00..2.42 rows=1 width=274) (actual time=0.003..0.005 rows=1 loops=1)

  • Filter: (id = 2)
  • Rows Removed by Filter: 20
22. 0.002 0.002 ↑ 1.0 3 1

Seq Scan on gravidade_pendencias gravidade_pendencias_1 (cost=0.00..1.03 rows=3 width=14) (actual time=0.001..0.002 rows=3 loops=1)

23. 0.000 1.902 ↓ 1.7 1,578 1

Seq Scan on precatorios precatorios_1 (cost=0.00..4,181.19 rows=954 width=16) (actual time=0.010..1.902 rows=1,578 loops=1)

  • Filter: (NOT (SubPlan 23))
  • Rows Removed by Filter: 329
24.          

SubPlan (for Seq Scan)

25. 1.907 1.907 ↓ 0.0 0 1,907

Index Only Scan using index_precatorio_atualizacao_monetarias_on_precatorio_id on precatorio_atualizacao_monetarias (cost=0.15..4.17 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,907)

  • Index Cond: (precatorio_id = precatorios_1.id)
  • Heap Fetches: 0
26. 0.295 0.583 ↑ 1.0 2,063 1

Hash (cost=52.63..52.63 rows=2,063 width=33) (actual time=0.583..0.583 rows=2,063 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 145kB
27. 0.288 0.288 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_1 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.001..0.288 rows=2,063 loops=1)

28. 0.659 1.745 ↓ 2.0 864 1

Hash Join (cost=86.33..156.41 rows=432 width=351) (actual time=0.970..1.745 rows=864 loops=1)

  • Hash Cond: (processo_principais_2.id = precatorios_2.processo_principal_id)
29. 0.130 0.130 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_2 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.001..0.130 rows=2,063 loops=1)

30. 0.430 0.956 ↑ 1.0 864 1

Hash (cost=75.53..75.53 rows=864 width=334) (actual time=0.956..0.956 rows=864 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 297kB
31. 0.132 0.526 ↑ 1.0 864 1

Nested Loop (cost=2.44..75.53 rows=864 width=334) (actual time=0.019..0.526 rows=864 loops=1)

32. 0.006 0.021 ↑ 1.0 1 1

Nested Loop (cost=2.44..4.82 rows=1 width=318) (actual time=0.017..0.021 rows=1 loops=1)

  • Join Filter: (tipo_pendencias_2.gravidade_pendencia_id = gravidade_pendencias_2.id)
  • Rows Removed by Join Filter: 2
33. 0.007 0.015 ↑ 1.0 1 1

Hash Join (cost=2.44..3.75 rows=1 width=308) (actual time=0.012..0.015 rows=1 loops=1)

  • Hash Cond: (telas_2.id = tipo_pendencias_2.telas_id)
34. 0.003 0.003 ↓ 1.0 23 1

Seq Scan on telas telas_2 (cost=0.00..1.22 rows=22 width=42) (actual time=0.001..0.003 rows=23 loops=1)

35. 0.001 0.005 ↑ 1.0 1 1

Hash (cost=2.42..2.42 rows=1 width=274) (actual time=0.005..0.005 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
36. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on tipo_pendencias tipo_pendencias_2 (cost=0.00..2.42 rows=1 width=274) (actual time=0.002..0.004 rows=1 loops=1)

  • Filter: (id = 3)
  • Rows Removed by Filter: 20
37. 0.000 0.000 ↑ 1.0 3 1

Seq Scan on gravidade_pendencias gravidade_pendencias_2 (cost=0.00..1.03 rows=3 width=14) (actual time=0.000..0.000 rows=3 loops=1)

38. 0.373 0.373 ↑ 1.0 864 1

Seq Scan on precatorios precatorios_2 (cost=0.00..62.07 rows=864 width=16) (actual time=0.001..0.373 rows=864 loops=1)

  • Filter: (data_valor_homologado IS NULL)
  • Rows Removed by Filter: 1043
39. 1.057 2.334 ↓ 2.0 1,547 1

Hash Join (cost=101.70..182.05 rows=774 width=351) (actual time=1.130..2.334 rows=1,547 loops=1)

  • Hash Cond: (processo_principais_3.id = precatorios_3.processo_principal_id)
40. 0.162 0.162 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_3 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.001..0.162 rows=2,063 loops=1)

41. 0.545 1.115 ↑ 1.0 1,547 1

Hash (cost=82.36..82.36 rows=1,547 width=334) (actual time=1.115..1.115 rows=1,547 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 520kB
42. 0.198 0.570 ↑ 1.0 1,547 1

Nested Loop (cost=2.44..82.36 rows=1,547 width=334) (actual time=0.031..0.570 rows=1,547 loops=1)

43. 0.006 0.031 ↑ 1.0 1 1

Nested Loop (cost=2.44..4.82 rows=1 width=318) (actual time=0.028..0.031 rows=1 loops=1)

  • Join Filter: (tipo_pendencias_3.gravidade_pendencia_id = gravidade_pendencias_3.id)
  • Rows Removed by Join Filter: 2
44. 0.014 0.025 ↑ 1.0 1 1

Hash Join (cost=2.44..3.75 rows=1 width=308) (actual time=0.022..0.025 rows=1 loops=1)

  • Hash Cond: (telas_3.id = tipo_pendencias_3.telas_id)
45. 0.004 0.004 ↓ 1.0 23 1

Seq Scan on telas telas_3 (cost=0.00..1.22 rows=22 width=42) (actual time=0.001..0.004 rows=23 loops=1)

46. 0.001 0.007 ↑ 1.0 1 1

Hash (cost=2.42..2.42 rows=1 width=274) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
47. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on tipo_pendencias tipo_pendencias_3 (cost=0.00..2.42 rows=1 width=274) (actual time=0.003..0.006 rows=1 loops=1)

  • Filter: (id = 4)
  • Rows Removed by Filter: 20
48. 0.000 0.000 ↑ 1.0 3 1

Seq Scan on gravidade_pendencias gravidade_pendencias_3 (cost=0.00..1.03 rows=3 width=14) (actual time=0.000..0.000 rows=3 loops=1)

49. 0.341 0.341 ↑ 1.0 1,547 1

Seq Scan on precatorios precatorios_3 (cost=0.00..62.07 rows=1,547 width=16) (actual time=0.001..0.341 rows=1,547 loops=1)

  • Filter: (percentual_juros_continuacao IS NULL)
  • Rows Removed by Filter: 360
50. 1.907 2,592.785 ↓ 3.2 1,547 1

Merge Join (cost=38,043.02..780,144.73 rows=477 width=351) (actual time=2,591.698..2,592.785 rows=1,547 loops=1)

  • Merge Cond: (telas_4.id = tipo_pendencias_4.telas_id)
51. 1.768 2,590.794 ↑ 1.7 12,377 1

Nested Loop (cost=0.42..799,111.84 rows=20,988 width=75) (actual time=1.306..2,590.794 rows=12,377 loops=1)

52. 0.014 0.014 ↑ 2.4 9 1

Index Scan using telas_pkey on telas telas_4 (cost=0.14..12.47 rows=22 width=42) (actual time=0.005..0.014 rows=9 loops=1)

53. 1.492 2,589.012 ↓ 1.4 1,375 9

Materialize (cost=0.28..798,839.40 rows=954 width=33) (actual time=0.145..287.668 rows=1,375 loops=9)

54. 2.511 2,587.520 ↓ 1.6 1,547 1

Nested Loop (cost=0.28..798,834.63 rows=954 width=33) (actual time=1.297..2,587.520 rows=1,547 loops=1)

55. 2.464 2,578.821 ↓ 1.6 1,547 1

Seq Scan on precatorios precatorios_4 (cost=0.00..798,378.89 rows=954 width=16) (actual time=1.290..2,578.821 rows=1,547 loops=1)

  • Filter: (NOT (SubPlan 22))
  • Rows Removed by Filter: 360
56.          

SubPlan (for Seq Scan)

57. 1.907 2,576.357 ↓ 0.0 0 1,907

Subquery Scan on precatorios_eventos_rubricas_20 (cost=418.61..418.63 rows=2 width=8) (actual time=1.351..1.351 rows=0 loops=1,907)

58. 57.210 2,574.450 ↓ 0.0 0 1,907

Sort (cost=418.61..418.61 rows=2 width=212) (actual time=1.350..1.350 rows=0 loops=1,907)

  • Sort Key: participantes_24.nome, tipo_papeis_20.descricao, evento_financeiros_21.data_evento, evento_financeiros_21.id, configuracao_rubrica_precatorios_20.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
59. 16.123 2,517.240 ↑ 1.0 2 1,907

Nested Loop Left Join (cost=257.07..418.60 rows=2 width=212) (actual time=1.292..1.320 rows=2 loops=1,907)

  • Join Filter: ((precatorios_31.id = configuracao_rubrica_precatorios_20.precatorio_id) AND (tipo_rubricas_20.id = configuracao_rubrica_precatorios_20.tipo_rubrica_id))
  • Rows Removed by Join Filter: 7
60. 9.275 2,469.565 ↑ 1.0 2 1,907

Nested Loop (cost=257.07..400.57 rows=2 width=208) (actual time=1.281..1.295 rows=2 loops=1,907)

61. 13.349 2,452.402 ↑ 1.0 2 1,907

Nested Loop (cost=256.79..383.95 rows=2 width=191) (actual time=1.277..1.286 rows=2 loops=1,907)

  • Join Filter: (precatorio_participantes_25.tipo_papel_id = tipo_papeis_20.id)
  • Rows Removed by Join Filter: 10
62. 1.907 1.907 ↑ 1.0 6 1,907

Seq Scan on tipo_papeis tipo_papeis_20 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1,907)

63. 1.907 2,437.146 ↑ 1.0 2 11,442

Materialize (cost=256.79..382.71 rows=2 width=183) (actual time=0.210..0.213 rows=2 loops=11,442)

64. 3.814 2,435.239 ↑ 1.0 2 1,907

Nested Loop (cost=256.79..382.70 rows=2 width=183) (actual time=1.257..1.277 rows=2 loops=1,907)

65. 7.628 7.628 ↑ 1.0 1 1,907

Index Scan using precatorios_pkey on precatorios precatorios_31 (cost=0.28..8.29 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=1,907)

  • Index Cond: (id = precatorios_4.id)
66. 15.256 2,423.797 ↑ 1.0 2 1,907

Nested Loop (cost=256.51..374.39 rows=2 width=175) (actual time=1.251..1.271 rows=2 loops=1,907)

  • Join Filter: (rubrica_eventos_20.tipo_rubrica_id = tipo_rubricas_20.id)
  • Rows Removed by Join Filter: 70
67. 5.721 5.721 ↑ 1.0 35 1,907

Seq Scan on tipo_rubricas tipo_rubricas_20 (cost=0.00..1.35 rows=35 width=31) (actual time=0.001..0.003 rows=35 loops=1,907)

68. 32.419 2,402.820 ↑ 1.0 2 66,745

Materialize (cost=256.51..371.99 rows=2 width=152) (actual time=0.034..0.036 rows=2 loops=66,745)

69. 7.498 2,370.401 ↑ 1.0 2 1,907

Nested Loop (cost=256.51..371.98 rows=2 width=152) (actual time=1.180..1.243 rows=2 loops=1,907)

70. 146.367 2,358.959 ↑ 1.0 2 1,907

Hash Join (cost=256.38..371.63 rows=2 width=129) (actual time=1.178..1.237 rows=2 loops=1,907)

  • Hash Cond: (rubrica_eventos_20.evento_financeiro_id = evento_financeiros_21.id)
71. 99.636 99.636 ↑ 1.0 3,933 361

Seq Scan on rubrica_eventos rubrica_eventos_20 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.276 rows=3,933 loops=361)

72. 1.907 2,112.956 ↑ 1.0 1 1,907

Hash (cost=256.36..256.36 rows=1 width=105) (actual time=1.108..1.108 rows=1 loops=1,907)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
73. 5.833 2,111.049 ↑ 1.0 1 1,907

Nested Loop (cost=213.36..256.36 rows=1 width=105) (actual time=1.076..1.107 rows=1 loops=1,907)

74. 177.012 2,101.514 ↑ 1.0 1 1,907

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=1.073..1.102 rows=1 loops=1,907)

  • Hash Cond: (evento_financeiros_21.precatorio_participante_id = precatorio_participantes_25.id)
75. 389.367 389.367 ↑ 1.0 1,234 1,881

Seq Scan on evento_financeiros evento_financeiros_21 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.001..0.207 rows=1,234 loops=1,881)

76. 5.721 1,535.135 ↑ 1.0 4 1,907

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.805..0.805 rows=4 loops=1,907)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
77. 1,529.414 1,529.414 ↑ 1.0 4 1,907

Seq Scan on precatorio_participantes precatorio_participantes_25 (cost=0.00..213.03 rows=4 width=48) (actual time=0.313..0.802 rows=4 loops=1,907)

  • Filter: (precatorio_id = precatorios_4.id)
  • Rows Removed by Filter: 7518
78. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using participantes_pkey on participantes participantes_24 (cost=0.28..8.30 rows=1 width=36) (actual time=0.003..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_25.participante_id)
79. 3.944 3.944 ↑ 1.0 1 3,944

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_21 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=3,944)

  • Index Cond: (id = evento_financeiros_21.tipo_evento_financeiro_id)
80. 7.888 7.888 ↑ 1.0 1 3,944

Index Scan using processo_principais_pkey on processo_principais processo_principais_31 (cost=0.28..8.30 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=3,944)

  • Index Cond: (id = precatorios_31.processo_principal_id)
81. 2.032 31.552 ↓ 2.5 5 3,944

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.005..0.008 rows=5 loops=3,944)

82. 29.520 29.520 ↑ 1.0 2 360

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_20 (cost=0.00..17.91 rows=2 width=12) (actual time=0.045..0.082 rows=2 loops=360)

  • Filter: (precatorio_id = precatorios_4.id)
  • Rows Removed by Filter: 791
83. 6.188 6.188 ↑ 1.0 1 1,547

Index Scan using processo_principais_pkey on processo_principais processo_principais_4 (cost=0.28..0.47 rows=1 width=33) (actual time=0.004..0.004 rows=1 loops=1,547)

  • Index Cond: (id = precatorios_4.processo_principal_id)
84. 0.068 0.084 ↑ 1.0 1 1

Materialize (cost=3.50..3.51 rows=1 width=284) (actual time=0.019..0.084 rows=1 loops=1)

85. 0.006 0.016 ↑ 1.0 1 1

Sort (cost=3.50..3.51 rows=1 width=284) (actual time=0.016..0.016 rows=1 loops=1)

  • Sort Key: tipo_pendencias_4.telas_id
  • Sort Method: quicksort Memory: 25kB
86. 0.004 0.010 ↑ 1.0 1 1

Nested Loop (cost=0.00..3.49 rows=1 width=284) (actual time=0.008..0.010 rows=1 loops=1)

  • Join Filter: (tipo_pendencias_4.gravidade_pendencia_id = gravidade_pendencias_4.id)
  • Rows Removed by Join Filter: 2
87. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on tipo_pendencias tipo_pendencias_4 (cost=0.00..2.42 rows=1 width=274) (actual time=0.003..0.005 rows=1 loops=1)

  • Filter: (id = 5)
  • Rows Removed by Filter: 20
88. 0.001 0.001 ↑ 1.0 3 1

Seq Scan on gravidade_pendencias gravidade_pendencias_4 (cost=0.00..1.03 rows=3 width=14) (actual time=0.001..0.001 rows=3 loops=1)

89. 1.500 5,196.890 ↓ 2.3 1,116 1

Merge Join (cost=113,578.50..2,329,264.72 rows=477 width=351) (actual time=5,196.178..5,196.890 rows=1,116 loops=1)

  • Merge Cond: (telas_5.id = tipo_pendencias_5.telas_id)
90. 1.243 5,195.298 ↑ 2.4 8,929 1

Nested Loop (cost=0.42..2,386,037.38 rows=20,988 width=75) (actual time=3.276..5,195.298 rows=8,929 loops=1)

91. 0.011 0.011 ↑ 2.4 9 1

Index Scan using telas_pkey on telas telas_5 (cost=0.14..12.47 rows=22 width=42) (actual time=0.005..0.011 rows=9 loops=1)

92. 1.234 5,194.044 ↓ 1.0 992 9

Materialize (cost=0.28..2,385,764.94 rows=954 width=33) (actual time=0.363..577.116 rows=992 loops=9)

93. 2.924 5,192.810 ↓ 1.2 1,116 1

Nested Loop (cost=0.28..2,385,760.17 rows=954 width=33) (actual time=3.268..5,192.810 rows=1,116 loops=1)

94. 138.384 5,184.306 ↓ 1.2 1,116 1

Seq Scan on precatorios precatorios_5 (cost=0.00..2,385,304.43 rows=954 width=16) (actual time=3.254..5,184.306 rows=1,116 loops=1)

  • Filter: (SubPlan 21)
  • Rows Removed by Filter: 791
95.          

SubPlan (for Seq Scan)

96. 563.373 5,045.922 ↓ 1.6 1,039 1,907

HashAggregate (cost=1,245.80..1,254.10 rows=664 width=206) (actual time=2.416..2.646 rows=1,039 loops=1,907)

97. 1.099 1.099 ↑ 1.0 2,655 1

Seq Scan on precatorio_participantes prec_part_2 (cost=0.00..194.22 rows=2,655 width=206) (actual time=0.007..1.099 rows=2,655 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4867
98.          

SubPlan (for HashAggregate)

99. 17.163 4,481.450 ↑ 1.0 1 1,907

Aggregate (cost=1,038.29..1,038.30 rows=1 width=8) (actual time=2.350..2.350 rows=1 loops=1,907)

100. 2.036 4,464.287 ↓ 2.0 2 1,907

Nested Loop (cost=817.21..1,038.29 rows=1 width=8) (actual time=2.108..2.341 rows=2 loops=1,907)

101. 4.648 3,947.490 ↓ 0.0 0 1,907

Nested Loop (cost=817.21..825.26 rows=1 width=8) (actual time=2.068..2.070 rows=0 loops=1,907)

  • Join Filter: (tab1_9.data_evento = prec.data_valor_homologado)
  • Rows Removed by Join Filter: 0
102. 7.628 3,939.862 ↓ 0.0 0 1,907

Sort (cost=816.93..816.94 rows=1 width=151) (actual time=2.066..2.066 rows=0 loops=1,907)

  • Sort Key: tab1_9.numero_processo_principal, tab1_9.participantes_nome
  • Sort Method: quicksort Memory: 25kB
103. 6.103 3,932.234 ↓ 0.0 0 1,907

Subquery Scan on tab1_9 (cost=416.30..816.92 rows=1 width=151) (actual time=1.529..2.062 rows=0 loops=1,907)

  • Filter: (tab1_9.data_evento_id = (SubPlan 19))
  • Rows Removed by Filter: 0
104. 3.814 2,526.775 ↑ 2.0 1 1,907

GroupAggregate (cost=416.30..416.39 rows=2 width=151) (actual time=1.324..1.325 rows=1 loops=1,907)

105. 43.861 2,522.961 ↑ 1.0 2 1,907

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=1.322..1.323 rows=2 loops=1,907)

  • Sort Key: precatorios_eventos_rubricas_19.precatorios_id, precatorios_eventos_rubricas_19.participantes_nome, precatorios_eventos_rubricas_19.data_evento, precatorios_eventos_rubricas_19.data_evento_id, precatorios_eventos_rubricas_19.numero_processo_principal, precatorios_eventos_rubricas_19.evento_financeiros_id, precatorios_eventos_rubricas_19.tipo_evento_descricao, precatorios_eventos_rubricas_19.tipo_evento_calculavel, precatorios_eventos_rubricas_19.tipo_evento_pagamento, precatorios_eventos_rubricas_19.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_19.tipo_evento_saldo, precatorios_eventos_rubricas_19.participantes_id, precatorios_eventos_rubricas_19.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
106. 3.814 2,479.100 ↑ 1.0 2 1,907

Subquery Scan on precatorios_eventos_rubricas_19 (cost=416.26..416.29 rows=2 width=151) (actual time=1.299..1.300 rows=2 loops=1,907)

107. 51.489 2,475.286 ↑ 1.0 2 1,907

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=1.298..1.298 rows=2 loops=1,907)

  • Sort Key: participantes_23.nome, tipo_papeis_19.descricao, evento_financeiros_20.data_evento, evento_financeiros_20.id, configuracao_rubrica_precatorios_19.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
108. 14.216 2,423.797 ↑ 1.0 2 1,907

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.193..1.271 rows=2 loops=1,907)

  • Join Filter: ((precatorios_30.id = configuracao_rubrica_precatorios_19.precatorio_id) AND (tipo_rubricas_19.id = configuracao_rubrica_precatorios_19.tipo_rubrica_id))
  • Rows Removed by Join Filter: 7
109. 3.554 2,378.029 ↑ 1.0 2 1,907

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.182..1.247 rows=2 loops=1,907)

110. 1.907 2,366.587 ↑ 1.0 2 1,907

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.180..1.241 rows=2 loops=1,907)

111. 11.442 11.442 ↑ 1.0 1 1,907

Index Scan using precatorios_pkey on precatorios precatorios_30 (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=1,907)

  • Index Cond: (id = precatorios_5.id)
112. 9.275 2,353.238 ↑ 1.0 2 1,907

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.173..1.234 rows=2 loops=1,907)

113. 139.516 2,336.075 ↑ 1.0 2 1,907

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.168..1.225 rows=2 loops=1,907)

  • Hash Cond: (rubrica_eventos_19.evento_financeiro_id = evento_financeiros_20.id)
114. 93.138 93.138 ↑ 1.0 3,933 361

Seq Scan on rubrica_eventos rubrica_eventos_19 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.258 rows=3,933 loops=361)

115. 1.907 2,103.421 ↑ 1.0 1 1,907

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.103..1.103 rows=1 loops=1,907)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
116. 2.580 2,101.514 ↑ 1.0 1 1,907

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=1.072..1.102 rows=1 loops=1,907)

  • Join Filter: (precatorio_participantes_24.tipo_papel_id = tipo_papeis_19.id)
  • Rows Removed by Join Filter: 3
117. 3.253 2,097.700 ↑ 1.0 1 1,907

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=1.071..1.100 rows=1 loops=1,907)

118. 5.160 2,091.979 ↑ 1.0 1 1,907

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=1.069..1.097 rows=1 loops=1,907)

119. 169.332 2,084.351 ↑ 1.0 1 1,907

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=1.066..1.093 rows=1 loops=1,907)

  • Hash Cond: (evento_financeiros_20.precatorio_participante_id = precatorio_participantes_24.id)
120. 385.605 385.605 ↑ 1.0 1,234 1,881

Seq Scan on evento_financeiros evento_financeiros_20 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.001..0.205 rows=1,234 loops=1,881)

121. 5.721 1,529.414 ↑ 1.0 4 1,907

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.802..0.802 rows=4 loops=1,907)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
122. 1,523.693 1,523.693 ↑ 1.0 4 1,907

Seq Scan on precatorio_participantes precatorio_participantes_24 (cost=0.00..213.03 rows=4 width=48) (actual time=0.315..0.799 rows=4 loops=1,907)

  • Filter: (precatorio_id = precatorios_5.id)
  • Rows Removed by Filter: 7518
123. 2.468 2.468 ↑ 1.0 1 1,234

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_20 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=1,234)

  • Index Cond: (id = evento_financeiros_20.tipo_evento_financeiro_id)
124. 2.468 2.468 ↑ 1.0 1 1,234

Index Scan using participantes_pkey on participantes participantes_23 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_24.participante_id)
125. 1.234 1.234 ↑ 1.0 6 1,234

Seq Scan on tipo_papeis tipo_papeis_19 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=1,234)

126. 7.888 7.888 ↑ 1.0 1 3,944

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_19 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=3,944)

  • Index Cond: (id = rubrica_eventos_19.tipo_rubrica_id)
127. 7.888 7.888 ↑ 1.0 1 3,944

Index Scan using processo_principais_pkey on processo_principais processo_principais_30 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=3,944)

  • Index Cond: (id = precatorios_30.processo_principal_id)
128. 4.192 31.552 ↓ 2.5 5 3,944

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.004..0.008 rows=5 loops=3,944)

129. 27.360 27.360 ↑ 1.0 2 360

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_19 (cost=0.00..17.91 rows=2 width=12) (actual time=0.040..0.076 rows=2 loops=360)

  • Filter: (precatorio_id = precatorios_5.id)
  • Rows Removed by Filter: 791
130.          

SubPlan (for Subquery Scan)

131. 2.468 1,399.356 ↑ 1.0 1 1,234

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.134..1.134 rows=1 loops=1,234)

132. 8.638 1,396.888 ↑ 1.5 2 1,234

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.130..1.132 rows=2 loops=1,234)

133. 77.742 1,388.250 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.125..1.125 rows=7 loops=1,234)

  • Sort Key: precatorios_eventos_rubricas_18.precatorios_id, precatorios_eventos_rubricas_18.participantes_nome, precatorios_eventos_rubricas_18.data_evento, precatorios_eventos_rubricas_18.data_evento_id, precatorios_eventos_rubricas_18.numero_processo_principal, precatorios_eventos_rubricas_18.evento_financeiros_id, precatorios_eventos_rubricas_18.tipo_evento_descricao, precatorios_eventos_rubricas_18.tipo_evento_calculavel, precatorios_eventos_rubricas_18.tipo_evento_pagamento, precatorios_eventos_rubricas_18.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_18.tipo_evento_saldo, precatorios_eventos_rubricas_18.participantes_id, precatorios_eventos_rubricas_18.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
134. 3.702 1,310.508 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_18 (cost=200.00..200.04 rows=3 width=151) (actual time=1.060..1.062 rows=7 loops=1,234)

135. 87.614 1,306.806 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.058..1.059 rows=7 loops=1,234)

  • Sort Key: precatorios_29.id, participantes_22.nome, tipo_papeis_18.descricao, evento_financeiros_19.data_evento, evento_financeiros_19.id, configuracao_rubrica_precatorios_18.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
136. 31.670 1,219.192 ↓ 2.3 7 1,234

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.885..0.988 rows=7 loops=1,234)

137. 117.230 1,171.066 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.871..0.949 rows=7 loops=1,234)

  • Hash Cond: ((configuracao_rubrica_precatorios_18.precatorio_id = precatorios_29.id) AND (configuracao_rubrica_precatorios_18.tipo_rubrica_id = tipo_rubricas_18.id))
138. 61.700 61.700 ↑ 1.0 793 1,234

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_18 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.050 rows=793 loops=1,234)

139. 6.170 992.136 ↓ 2.3 7 1,234

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.804..0.804 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
140. 11.516 985.966 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.462..0.799 rows=7 loops=1,234)

141. 2.468 966.222 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.457..0.783 rows=7 loops=1,234)

142. 3.702 22.212 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.015..0.018 rows=1 loops=1,234)

  • Join Filter: (precatorio_participantes_23.tipo_papel_id = tipo_papeis_18.id)
  • Rows Removed by Join Filter: 5
143. 1.234 17.276 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.012..0.014 rows=1 loops=1,234)

144. 1.234 12.340 ↑ 1.0 1 1,234

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.009..0.010 rows=1 loops=1,234)

145. 7.404 7.404 ↑ 1.0 1 1,234

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_23 (cost=0.28..8.30 rows=1 width=48) (actual time=0.005..0.006 rows=1 loops=1,234)

  • Index Cond: (id = tab1_9.precatorio_participantes_id)
146. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using precatorios_pkey on precatorios precatorios_29 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_23.precatorio_id)
147. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using participantes_pkey on participantes participantes_22 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_23.participante_id)
148. 1.234 1.234 ↑ 1.0 6 1,234

Seq Scan on tipo_papeis tipo_papeis_18 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1,234)

149. 12.340 941.542 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.441..0.763 rows=7 loops=1,234)

  • Join Filter: (evento_financeiros_19.tipo_evento_financeiro_id = tipo_evento_financeiros_19.id)
  • Rows Removed by Join Filter: 21
150. 454.112 929.202 ↓ 1.2 7 1,234

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.437..0.753 rows=7 loops=1,234)

  • Hash Cond: (rubrica_eventos_18.evento_financeiro_id = evento_financeiros_19.id)
151. 331.946 331.946 ↑ 1.0 3,944 1,234

Seq Scan on rubrica_eventos rubrica_eventos_18 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.269 rows=3,944 loops=1,234)

152. 2.468 143.144 ↑ 1.0 2 1,234

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.116..0.116 rows=2 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
153. 140.676 140.676 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_19 (cost=0.00..33.42 rows=2 width=37) (actual time=0.057..0.114 rows=2 loops=1,234)

  • Filter: (precatorio_participante_id = tab1_9.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
154. 0.000 0.000 ↑ 1.0 4 8,548

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=8,548)

155. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_19 (cost=0.00..1.09 rows=4 width=31) (actual time=0.002..0.004 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
156. 8.228 8.228 ↑ 1.0 1 8,228

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_18 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_18.tipo_rubrica_id)
157. 16.456 16.456 ↑ 1.0 1 8,228

Index Scan using processo_principais_pkey on processo_principais processo_principais_29 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = precatorios_29.processo_principal_id)
158. 2.980 2.980 ↑ 1.0 1 596

Index Scan using precatorios_pkey on precatorios prec (cost=0.28..8.29 rows=1 width=12) (actual time=0.004..0.005 rows=1 loops=596)

  • Index Cond: (id = precatorios_5.id)
159. 514.761 514.761 ↓ 7.0 7 591

Seq Scan on precatorio_participantes prec_part_1 (cost=0.00..213.03 rows=1 width=16) (actual time=0.169..0.871 rows=7 loops=591)

  • Filter: (credor AND (precatorio_id = precatorios_5.id))
  • Rows Removed by Filter: 7515
160. 5.580 5.580 ↑ 1.0 1 1,116

Index Scan using processo_principais_pkey on processo_principais processo_principais_5 (cost=0.28..0.47 rows=1 width=33) (actual time=0.005..0.005 rows=1 loops=1,116)

  • Index Cond: (id = precatorios_5.processo_principal_id)
161. 0.059 0.092 ↑ 1.0 1 1

Materialize (cost=3.50..3.51 rows=1 width=284) (actual time=0.035..0.092 rows=1 loops=1)

162. 0.007 0.033 ↑ 1.0 1 1

Sort (cost=3.50..3.51 rows=1 width=284) (actual time=0.033..0.033 rows=1 loops=1)

  • Sort Key: tipo_pendencias_5.telas_id
  • Sort Method: quicksort Memory: 25kB
163. 0.012 0.026 ↑ 1.0 1 1

Nested Loop (cost=0.00..3.49 rows=1 width=284) (actual time=0.020..0.026 rows=1 loops=1)

  • Join Filter: (tipo_pendencias_5.gravidade_pendencia_id = gravidade_pendencias_5.id)
  • Rows Removed by Join Filter: 2
164. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on tipo_pendencias tipo_pendencias_5 (cost=0.00..2.42 rows=1 width=274) (actual time=0.007..0.011 rows=1 loops=1)

  • Filter: (id = 6)
  • Rows Removed by Filter: 20
165. 0.003 0.003 ↑ 1.0 3 1

Seq Scan on gravidade_pendencias gravidade_pendencias_5 (cost=0.00..1.03 rows=3 width=14) (actual time=0.002..0.003 rows=3 loops=1)

166. 1.071 24,700.638 ↓ 2.5 1,178 1

Merge Join (cost=455,408,892.46..9,339,757,090.34 rows=477 width=351) (actual time=24,699.881..24,700.638 rows=1,178 loops=1)

  • Merge Cond: (telas_6.id = tipo_pendencias_6.telas_id)
167. 1.172 24,699.472 ↑ 2.2 9,425 1

Nested Loop (cost=0.14..9,567,689,395.65 rows=20,988 width=75) (actual time=4,634.063..24,699.472 rows=9,425 loops=1)

168. 0.014 0.014 ↑ 2.4 9 1

Index Scan using telas_pkey on telas telas_6 (cost=0.14..12.47 rows=22 width=42) (actual time=0.003..0.014 rows=9 loops=1)

169. 0.937 24,698.286 ↓ 1.1 1,047 9

Materialize (cost=0.00..9,567,689,123.22 rows=954 width=33) (actual time=514.895..2,744.254 rows=1,047 loops=9)

170. 202.863 24,697.349 ↓ 1.2 1,178 1

Nested Loop (cost=0.00..9,567,689,118.45 rows=954 width=33) (actual time=4,634.055..24,697.349 rows=1,178 loops=1)

  • Join Filter: (precatorios_6.processo_principal_id = processo_principais_6.id)
  • Rows Removed by Join Filter: 2429036
171. 0.487 0.487 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_6 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.002..0.487 rows=2,063 loops=1)

172. 97.493 24,493.999 ↓ 1.2 1,178 2,063

Materialize (cost=0.00..9,567,659,546.67 rows=954 width=16) (actual time=1.835..11.873 rows=1,178 loops=2,063)

173. 160.443 24,396.506 ↓ 1.2 1,178 1

Seq Scan on precatorios precatorios_6 (cost=0.00..9,567,659,541.90 rows=954 width=16) (actual time=3,784.559..24,396.506 rows=1,178 loops=1)

  • Filter: (SubPlan 18)
  • Rows Removed by Filter: 729
174.          

SubPlan (for Seq Scan)

175. 715.125 24,236.063 ↓ 1.5 1,009 1,907

Sort (cost=5,017,124.44..5,017,126.10 rows=664 width=8) (actual time=12.661..12.709 rows=1,009 loops=1,907)

  • Sort Key: prec_part.precatorio_id
  • Sort Method: quicksort Memory: 117kB
176. 2,617.821 23,520.938 ↓ 2.2 1,471 1,907

HashAggregate (cost=3,325,462.73..5,017,093.32 rows=664 width=8) (actual time=6.675..12.334 rows=1,471 loops=1,907)

177. 0.882 0.882 ↑ 1.0 2,655 1

Seq Scan on precatorio_participantes prec_part (cost=0.00..194.22 rows=2,655 width=8) (actual time=0.002..0.882 rows=2,655 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4867
178.          

SubPlan (for HashAggregate)

179. 0.002 2,315.634 ↑ 266.0 4 1

Subquery Scan on quitacao_saldo_precatorio (cost=793,058.70..2,531,698.69 rows=1,064 width=8) (actual time=1,639.468..2,315.634 rows=4 loops=1)

180. 8.460 2,315.632 ↑ 266.0 4 1

GroupAggregate (cost=793,058.70..2,531,688.05 rows=1,064 width=65) (actual time=1,639.468..2,315.632 rows=4 loops=1)

  • Filter: CASE WHEN ((count(precatorio_participantes_7.credor)) = (SubPlan 5)) THEN true ELSE false END
  • Rows Removed by Filter: 356
181. 18.420 1,508.376 ↓ 4.7 5,052 1

Sort (cost=793,058.70..793,061.36 rows=1,064 width=65) (actual time=1,507.843..1,508.376 rows=5,052 loops=1)

  • Sort Key: ultimos_eventos_financeiros_saldo_participantes_precatorios.numero_processo_principal, ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id, (count(precatorio_participantes_7.credor))
  • Sort Method: quicksort Memory: 903kB
182. 0.921 1,489.956 ↓ 4.7 5,052 1

Hash Left Join (cost=792,826.52..793,005.20 rows=1,064 width=65) (actual time=1,484.590..1,489.956 rows=5,052 loops=1)

  • Hash Cond: (precatorio_participantes_6.orcamentario_id = orcamentarios.id)
183. 1.276 1,489.034 ↓ 4.7 5,052 1

Hash Left Join (cost=792,803.24..792,977.93 rows=1,064 width=65) (actual time=1,484.577..1,489.034 rows=5,052 loops=1)

  • Hash Cond: (precatorio_participantes_6.rpv_id = rpvs.id)
184. 1.188 1,486.043 ↓ 4.7 5,052 1

Hash Left Join (cost=792,725.14..792,890.86 rows=1,064 width=69) (actual time=1,482.846..1,486.043 rows=5,052 loops=1)

  • Hash Cond: (precatorios_14.id = precatorio_participantes_6.precatorio_id)
185. 0.467 1,480.803 ↓ 2.2 596 1

Hash Right Join (cost=792,436.89..792,542.44 rows=266 width=61) (actual time=1,478.776..1,480.803 rows=596 loops=1)

  • Hash Cond: (precatorios_14.id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
186. 1.308 17.314 ↑ 1.8 1,471 1

GroupAggregate (cost=750.79..817.16 rows=2,655 width=62) (actual time=15.735..17.314 rows=1,471 loops=1)

187. 10.109 16.006 ↑ 1.0 2,655 1

Sort (cost=750.79..757.43 rows=2,655 width=62) (actual time=15.717..16.006 rows=2,655 loops=1)

  • Sort Key: processo_principais_14.numero_processo, precatorios_14.id
  • Sort Method: quicksort Memory: 471kB
188. 0.899 5.897 ↑ 1.0 2,655 1

Hash Join (cost=322.60..599.79 rows=2,655 width=62) (actual time=3.052..5.897 rows=2,655 loops=1)

  • Hash Cond: (precatorio_participantes_7.participante_id = participantes_7.id)
189. 0.694 4.037 ↑ 1.0 2,655 1

Hash Join (cost=192.93..426.98 rows=2,655 width=42) (actual time=2.081..4.037 rows=2,655 loops=1)

  • Hash Cond: (precatorio_participantes_7.precatorio_id = precatorios_14.id)
190. 1.275 1.275 ↑ 1.0 2,655 1

Seq Scan on precatorio_participantes precatorio_participantes_7 (cost=0.00..194.22 rows=2,655 width=17) (actual time=0.003..1.275 rows=2,655 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4867
191. 0.333 2.068 ↑ 1.0 1,907 1

Hash (cost=169.09..169.09 rows=1,907 width=33) (actual time=2.068..2.068 rows=1,907 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 123kB
192. 0.611 1.735 ↑ 1.0 1,907 1

Hash Join (cost=78.42..169.09 rows=1,907 width=33) (actual time=0.744..1.735 rows=1,907 loops=1)

  • Hash Cond: (precatorios_14.processo_principal_id = processo_principais_14.id)
193. 0.392 0.392 ↑ 1.0 1,907 1

Seq Scan on precatorios precatorios_14 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.002..0.392 rows=1,907 loops=1)

194. 0.432 0.732 ↑ 1.0 2,063 1

Hash (cost=52.63..52.63 rows=2,063 width=33) (actual time=0.732..0.732 rows=2,063 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 145kB
195. 0.300 0.300 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_14 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.002..0.300 rows=2,063 loops=1)

196. 0.495 0.961 ↑ 1.0 3,141 1

Hash (cost=90.41..90.41 rows=3,141 width=36) (actual time=0.961..0.961 rows=3,141 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 220kB
197. 0.466 0.466 ↑ 1.0 3,141 1

Seq Scan on participantes participantes_7 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.004..0.466 rows=3,141 loops=1)

198. 0.126 1,463.022 ↓ 29.8 596 1

Hash (cost=791,685.86..791,685.86 rows=20 width=45) (actual time=1,463.022..1,463.022 rows=596 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
199. 0.120 1,462.896 ↓ 29.8 596 1

Subquery Scan on ultimos_eventos_financeiros_saldo_participantes_precatorios (cost=791,685.61..791,685.86 rows=20 width=45) (actual time=1,462.750..1,462.896 rows=596 loops=1)

200. 3.468 1,462.776 ↓ 29.8 596 1

Sort (cost=791,685.61..791,685.66 rows=20 width=151) (actual time=1,462.749..1,462.776 rows=596 loops=1)

  • Sort Key: tab1_2.numero_processo_principal, tab1_2.participantes_nome
  • Sort Method: quicksort Memory: 183kB
201. 2.633 1,459.308 ↓ 29.8 596 1

Subquery Scan on tab1_2 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=100.975..1,459.308 rows=596 loops=1)

  • Filter: (tab1_2.data_evento_id = (SubPlan 6))
  • Rows Removed by Filter: 638
202. 2.988 99.275 ↑ 3.2 1,234 1

GroupAggregate (cost=1,659.01..1,846.35 rows=3,944 width=151) (actual time=95.844..99.275 rows=1,234 loops=1)

203. 30.682 96.287 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=95.824..96.287 rows=3,944 loops=1)

  • Sort Key: precatorios_eventos_rubricas_5.precatorios_id, precatorios_eventos_rubricas_5.participantes_nome, precatorios_eventos_rubricas_5.data_evento, precatorios_eventos_rubricas_5.data_evento_id, precatorios_eventos_rubricas_5.numero_processo_principal, precatorios_eventos_rubricas_5.evento_financeiros_id, precatorios_eventos_rubricas_5.tipo_evento_descricao, precatorios_eventos_rubricas_5.tipo_evento_calculavel, precatorios_eventos_rubricas_5.tipo_evento_pagamento, precatorios_eventos_rubricas_5.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_5.tipo_evento_saldo, precatorios_eventos_rubricas_5.participantes_id, precatorios_eventos_rubricas_5.precatorio_participantes_id
  • Sort Method: quicksort Memory: 1144kB
204. 1.411 65.605 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_5 (cost=1,374.15..1,423.45 rows=3,944 width=151) (actual time=63.762..65.605 rows=3,944 loops=1)

205. 43.785 64.194 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=63.758..64.194 rows=3,944 loops=1)

  • Sort Key: precatorios_15.id, participantes_8.nome, tipo_papeis_5.descricao, evento_financeiros_6.data_evento, evento_financeiros_6.id, configuracao_rubrica_precatorios_5.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
206. 6.542 20.409 ↑ 1.0 3,944 1

Hash Join (cost=972.25..1,138.58 rows=3,944 width=212) (actual time=11.760..20.409 rows=3,944 loops=1)

  • Hash Cond: (precatorios_15.processo_principal_id = processo_principais_15.id)
207. 2.063 13.292 ↑ 1.0 3,944 1

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=11.158..13.292 rows=3,944 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios_5.precatorio_id = precatorios_15.id) AND (configuracao_rubrica_precatorios_5.tipo_rubrica_id = tipo_rubricas_5.id))
208. 0.084 0.084 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_5 (cost=0.00..15.93 rows=793 width=12) (actual time=0.002..0.084 rows=793 loops=1)

209. 1.678 11.145 ↑ 1.0 3,944 1

Hash (cost=834.67..834.67 rows=3,944 width=191) (actual time=11.145..11.145 rows=3,944 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
210. 1.131 9.467 ↑ 1.0 3,944 1

Hash Join (cost=625.77..834.67 rows=3,944 width=191) (actual time=6.267..9.467 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_5.tipo_rubrica_id = tipo_rubricas_5.id)
211. 1.761 8.323 ↑ 1.0 3,944 1

Hash Join (cost=623.98..778.65 rows=3,944 width=168) (actual time=6.247..8.323 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_5.evento_financeiro_id = evento_financeiros_6.id)
212. 0.325 0.325 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_5 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.325 rows=3,944 loops=1)

213. 0.489 6.237 ↑ 1.0 1,234 1

Hash (cost=608.56..608.56 rows=1,234 width=144) (actual time=6.237..6.237 rows=1,234 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
214. 0.401 5.748 ↑ 1.0 1,234 1

Hash Join (cost=263.68..608.56 rows=1,234 width=144) (actual time=2.422..5.748 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.tipo_papel_id = tipo_papeis_5.id)
215. 0.360 5.343 ↑ 1.0 1,234 1

Hash Join (cost=262.55..590.45 rows=1,234 width=136) (actual time=2.411..5.343 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.participante_id = participantes_8.id)
216. 0.350 3.676 ↑ 1.0 1,234 1

Hash Join (cost=132.88..440.73 rows=1,234 width=108) (actual time=1.097..3.676 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.precatorio_id = precatorios_15.id)
217. 0.348 2.747 ↑ 1.0 1,234 1

Hash Join (cost=46.97..336.31 rows=1,234 width=100) (actual time=0.508..2.747 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros_6.tipo_evento_financeiro_id = tipo_evento_financeiros_6.id)
218. 0.867 2.392 ↑ 1.0 1,234 1

Hash Join (cost=45.77..318.14 rows=1,234 width=77) (actual time=0.491..2.392 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.id = evento_financeiros_6.precatorio_participante_id)
219. 1.052 1.052 ↑ 1.0 7,522 1

Seq Scan on precatorio_participantes precatorio_participantes_8 (cost=0.00..194.22 rows=7,522 width=48) (actual time=0.001..1.052 rows=7,522 loops=1)

220. 0.249 0.473 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=37) (actual time=0.473..0.473 rows=1,234 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
221. 0.224 0.224 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_6 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.002..0.224 rows=1,234 loops=1)

222. 0.004 0.007 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=31) (actual time=0.007..0.007 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
223. 0.003 0.003 ↑ 1.0 9 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_6 (cost=0.00..1.09 rows=9 width=31) (actual time=0.002..0.003 rows=9 loops=1)

224. 0.247 0.579 ↑ 1.0 1,907 1

Hash (cost=62.07..62.07 rows=1,907 width=16) (actual time=0.579..0.579 rows=1,907 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
225. 0.332 0.332 ↑ 1.0 1,907 1

Seq Scan on precatorios precatorios_15 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.001..0.332 rows=1,907 loops=1)

226. 0.456 1.307 ↑ 1.0 3,141 1

Hash (cost=90.41..90.41 rows=3,141 width=36) (actual time=1.307..1.307 rows=3,141 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
227. 0.851 0.851 ↑ 1.0 3,141 1

Seq Scan on participantes participantes_8 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.001..0.851 rows=3,141 loops=1)

228. 0.003 0.004 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=16) (actual time=0.004..0.004 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
229. 0.001 0.001 ↑ 1.0 6 1

Seq Scan on tipo_papeis tipo_papeis_5 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1)

230. 0.008 0.013 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=31) (actual time=0.013..0.013 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
231. 0.005 0.005 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_5 (cost=0.00..1.35 rows=35 width=31) (actual time=0.002..0.005 rows=35 loops=1)

232. 0.284 0.575 ↑ 1.0 2,063 1

Hash (cost=52.63..52.63 rows=2,063 width=33) (actual time=0.575..0.575 rows=2,063 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 145kB
233. 0.291 0.291 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_15 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.002..0.291 rows=2,063 loops=1)

234.          

SubPlan (for Subquery Scan)

235. 2.468 1,357.400 ↑ 1.0 1 1,234

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.100..1.100 rows=1 loops=1,234)

236. 7.404 1,354.932 ↑ 1.5 2 1,234

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.096..1.098 rows=2 loops=1,234)

237. 77.742 1,347.528 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.091..1.092 rows=7 loops=1,234)

  • Sort Key: precatorios_eventos_rubricas_4.precatorios_id, precatorios_eventos_rubricas_4.participantes_nome, precatorios_eventos_rubricas_4.data_evento, precatorios_eventos_rubricas_4.data_evento_id, precatorios_eventos_rubricas_4.numero_processo_principal, precatorios_eventos_rubricas_4.evento_financeiros_id, precatorios_eventos_rubricas_4.tipo_evento_descricao, precatorios_eventos_rubricas_4.tipo_evento_calculavel, precatorios_eventos_rubricas_4.tipo_evento_pagamento, precatorios_eventos_rubricas_4.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_4.tipo_evento_saldo, precatorios_eventos_rubricas_4.participantes_id, precatorios_eventos_rubricas_4.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
238. 3.702 1,269.786 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_4 (cost=200.00..200.04 rows=3 width=151) (actual time=1.027..1.029 rows=7 loops=1,234)

239. 87.614 1,266.084 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.026..1.026 rows=7 loops=1,234)

  • Sort Key: precatorios_13.id, participantes_6.nome, tipo_papeis_4.descricao, evento_financeiros_5.data_evento, evento_financeiros_5.id, configuracao_rubrica_precatorios_4.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
240. 32.904 1,178.470 ↓ 2.3 7 1,234

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.851..0.955 rows=7 loops=1,234)

241. 115.996 1,129.110 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.838..0.915 rows=7 loops=1,234)

  • Hash Cond: ((configuracao_rubrica_precatorios_4.precatorio_id = precatorios_13.id) AND (configuracao_rubrica_precatorios_4.tipo_rubrica_id = tipo_rubricas_4.id))
242. 61.700 61.700 ↑ 1.0 793 1,234

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_4 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.050 rows=793 loops=1,234)

243. 6.170 951.414 ↓ 2.3 7 1,234

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.771..0.771 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
244. 10.282 945.244 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.444..0.766 rows=7 loops=1,234)

245. 2.468 926.734 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.439..0.751 rows=7 loops=1,234)

246. 3.702 22.212 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.015..0.018 rows=1 loops=1,234)

  • Join Filter: (precatorio_participantes_5.tipo_papel_id = tipo_papeis_4.id)
  • Rows Removed by Join Filter: 5
247. 1.234 17.276 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.012..0.014 rows=1 loops=1,234)

248. 2.468 12.340 ↑ 1.0 1 1,234

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.009..0.010 rows=1 loops=1,234)

249. 6.170 6.170 ↑ 1.0 1 1,234

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_5 (cost=0.28..8.30 rows=1 width=48) (actual time=0.005..0.005 rows=1 loops=1,234)

  • Index Cond: (id = tab1_2.precatorio_participantes_id)
250. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using precatorios_pkey on precatorios precatorios_13 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_5.precatorio_id)
251. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using participantes_pkey on participantes participantes_6 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_5.participante_id)
252. 1.234 1.234 ↑ 1.0 6 1,234

Seq Scan on tipo_papeis tipo_papeis_4 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1,234)

253. 12.340 902.054 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.424..0.731 rows=7 loops=1,234)

  • Join Filter: (evento_financeiros_5.tipo_evento_financeiro_id = tipo_evento_financeiros_5.id)
  • Rows Removed by Join Filter: 21
254. 436.836 889.714 ↓ 1.2 7 1,234

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.421..0.721 rows=7 loops=1,234)

  • Hash Cond: (rubrica_eventos_4.evento_financeiro_id = evento_financeiros_5.id)
255. 309.734 309.734 ↑ 1.0 3,944 1,234

Seq Scan on rubrica_eventos rubrica_eventos_4 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.251 rows=3,944 loops=1,234)

256. 2.468 143.144 ↑ 1.0 2 1,234

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.116..0.116 rows=2 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
257. 140.676 140.676 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_5 (cost=0.00..33.42 rows=2 width=37) (actual time=0.056..0.114 rows=2 loops=1,234)

  • Filter: (precatorio_participante_id = tab1_2.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
258. 0.000 0.000 ↑ 1.0 4 8,548

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=8,548)

259. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_5 (cost=0.00..1.09 rows=4 width=31) (actual time=0.004..0.007 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
260. 8.228 8.228 ↑ 1.0 1 8,228

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_4 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_4.tipo_rubrica_id)
261. 16.456 16.456 ↑ 1.0 1 8,228

Index Scan using processo_principais_pkey on processo_principais processo_principais_13 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = precatorios_13.processo_principal_id)
262. 2.184 4.052 ↑ 1.0 7,522 1

Hash (cost=194.22..194.22 rows=7,522 width=24) (actual time=4.052..4.052 rows=7,522 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 314kB
263. 1.868 1.868 ↑ 1.0 7,522 1

Seq Scan on precatorio_participantes precatorio_participantes_6 (cost=0.00..194.22 rows=7,522 width=24) (actual time=0.006..1.868 rows=7,522 loops=1)

264. 0.685 1.715 ↑ 1.0 2,138 1

Hash (cost=51.38..51.38 rows=2,138 width=12) (actual time=1.715..1.715 rows=2,138 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 101kB
265. 1.030 1.030 ↑ 1.0 2,138 1

Seq Scan on rpvs (cost=0.00..51.38 rows=2,138 width=12) (actual time=0.005..1.030 rows=2,138 loops=1)

266. 0.001 0.001 ↓ 0.0 0 1

Hash (cost=15.90..15.90 rows=590 width=16) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
267. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on orcamentarios (cost=0.00..15.90 rows=590 width=16) (actual time=0.000..0.000 rows=0 loops=1)

268.          

SubPlan (for GroupAggregate)

269. 0.012 24.436 ↑ 1.0 1 4

Aggregate (cost=816.96..816.97 rows=1 width=1) (actual time=6.109..6.109 rows=1 loops=4)

270. 0.040 24.424 ↓ 2.0 2 4

Sort (cost=816.94..816.95 rows=1 width=151) (actual time=6.106..6.106 rows=2 loops=4)

  • Sort Key: tab1.numero_processo_principal, tab1.participantes_nome
  • Sort Method: quicksort Memory: 25kB
271. 0.037 24.384 ↓ 2.0 2 4

Subquery Scan on tab1 (cost=416.30..816.93 rows=1 width=151) (actual time=4.850..6.096 rows=2 loops=4)

  • Filter: (tab1.data_evento_id = (SubPlan 2))
272. 0.152 13.420 ↑ 1.0 2 4

GroupAggregate (cost=416.30..416.40 rows=2 width=151) (actual time=3.335..3.355 rows=2 loops=4)

  • Filter: CASE WHEN (sum(precatorios_eventos_rubricas_1.valor_com_sinal) <= 0::double precision) THEN true ELSE false END
  • Rows Removed by Filter: 5
273. 1.548 13.268 ↓ 21.5 43 4

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=3.316..3.317 rows=43 loops=4)

  • Sort Key: precatorios_eventos_rubricas_1.precatorios_id, precatorios_eventos_rubricas_1.participantes_nome, precatorios_eventos_rubricas_1.data_evento, precatorios_eventos_rubricas_1.data_evento_id, precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.evento_financeiros_id, precatorios_eventos_rubricas_1.tipo_evento_descricao, precatorios_eventos_rubricas_1.tipo_evento_calculavel, precatorios_eventos_rubricas_1.tipo_evento_pagamento, precatorios_eventos_rubricas_1.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_1.tipo_evento_saldo, precatorios_eventos_rubricas_1.participantes_id, precatorios_eventos_rubricas_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 56kB
274. 0.068 11.720 ↓ 21.5 43 4

Subquery Scan on precatorios_eventos_rubricas_1 (cost=416.26..416.29 rows=2 width=151) (actual time=2.916..2.930 rows=43 loops=4)

275. 2.868 11.652 ↓ 21.5 43 4

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=2.910..2.913 rows=43 loops=4)

  • Sort Key: participantes_3.nome, tipo_papeis_1.descricao, evento_financeiros_2.data_evento, evento_financeiros_2.id, configuracao_rubrica_precatorios_1.ordem_apresentacao
  • Sort Method: quicksort Memory: 86kB
276. 0.660 8.784 ↓ 21.5 43 4

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.274..2.196 rows=43 loops=4)

  • Join Filter: ((precatorios_10.id = configuracao_rubrica_precatorios_1.precatorio_id) AND (tipo_rubricas_1.id = configuracao_rubrica_precatorios_1.tipo_rubrica_id))
  • Rows Removed by Join Filter: 302
277. 0.152 7.780 ↓ 21.5 43 4

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.244..1.945 rows=43 loops=4)

278. 0.044 7.456 ↓ 21.5 43 4

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.238..1.864 rows=43 loops=4)

279. 0.032 0.032 ↑ 1.0 1 4

Index Scan using precatorios_pkey on precatorios precatorios_10 (cost=0.28..8.29 rows=1 width=16) (actual time=0.007..0.008 rows=1 loops=4)

  • Index Cond: (id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
280. 0.200 7.380 ↓ 21.5 43 4

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.228..1.845 rows=43 loops=4)

281. 1.480 7.008 ↓ 21.5 43 4

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.218..1.752 rows=43 loops=4)

  • Hash Cond: (rubrica_eventos_1.evento_financeiro_id = evento_financeiros_2.id)
282. 1.032 1.032 ↑ 1.0 3,944 4

Seq Scan on rubrica_eventos rubrica_eventos_1 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.002..0.258 rows=3,944 loops=4)

283. 0.028 4.496 ↓ 7.0 7 4

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.124..1.124 rows=7 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
284. 0.052 4.468 ↓ 7.0 7 4

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=0.843..1.117 rows=7 loops=4)

  • Join Filter: (precatorio_participantes_2.tipo_papel_id = tipo_papeis_1.id)
  • Rows Removed by Join Filter: 35
285. 0.012 4.388 ↓ 7.0 7 4

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=0.837..1.097 rows=7 loops=4)

286. 0.048 4.320 ↓ 7.0 7 4

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=0.831..1.080 rows=7 loops=4)

287. 0.372 4.244 ↓ 7.0 7 4

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=0.822..1.061 rows=7 loops=4)

  • Hash Cond: (evento_financeiros_2.precatorio_participante_id = precatorio_participantes_2.id)
288. 0.796 0.796 ↑ 1.0 1,234 4

Seq Scan on evento_financeiros evento_financeiros_2 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.002..0.199 rows=1,234 loops=4)

289. 0.012 3.076 ↑ 2.0 2 4

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.769..0.769 rows=2 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
290. 3.064 3.064 ↑ 2.0 2 4

Seq Scan on precatorio_participantes precatorio_participantes_2 (cost=0.00..213.03 rows=4 width=48) (actual time=0.271..0.766 rows=2 loops=4)

  • Filter: (precatorio_id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
  • Rows Removed by Filter: 7520
291. 0.028 0.028 ↑ 1.0 1 28

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_2 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=28)

  • Index Cond: (id = evento_financeiros_2.tipo_evento_financeiro_id)
292. 0.056 0.056 ↑ 1.0 1 28

Index Scan using participantes_pkey on participantes participantes_3 (cost=0.28..8.30 rows=1 width=36) (actual time=0.001..0.002 rows=1 loops=28)

  • Index Cond: (id = precatorio_participantes_2.participante_id)
293. 0.028 0.028 ↑ 1.0 6 28

Seq Scan on tipo_papeis tipo_papeis_1 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=28)

294. 0.172 0.172 ↑ 1.0 1 172

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_1 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=172)

  • Index Cond: (id = rubrica_eventos_1.tipo_rubrica_id)
295. 0.172 0.172 ↑ 1.0 1 172

Index Scan using processo_principais_pkey on processo_principais processo_principais_10 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.001 rows=1 loops=172)

  • Index Cond: (id = precatorios_10.processo_principal_id)
296. 0.064 0.344 ↓ 4.0 8 172

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.000..0.002 rows=8 loops=172)

297. 0.280 0.280 ↓ 2.5 5 4

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_1 (cost=0.00..17.91 rows=2 width=12) (actual time=0.012..0.070 rows=5 loops=4)

  • Filter: (precatorio_id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
  • Rows Removed by Filter: 788
298.          

SubPlan (for Subquery Scan)

299. 0.042 10.927 ↑ 1.0 1 7

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.561..1.561 rows=1 loops=7)

300. 0.098 10.885 ↑ 1.0 3 7

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.548..1.555 rows=3 loops=7)

301. 1.197 10.787 ↓ 6.0 18 7

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.540..1.541 rows=18 loops=7)

  • Sort Key: precatorios_eventos_rubricas.precatorios_id, precatorios_eventos_rubricas.participantes_nome, precatorios_eventos_rubricas.data_evento, precatorios_eventos_rubricas.data_evento_id, precatorios_eventos_rubricas.numero_processo_principal, precatorios_eventos_rubricas.evento_financeiros_id, precatorios_eventos_rubricas.tipo_evento_descricao, precatorios_eventos_rubricas.tipo_evento_calculavel, precatorios_eventos_rubricas.tipo_evento_pagamento, precatorios_eventos_rubricas.tipo_evento_primeiro_evento, precatorios_eventos_rubricas.tipo_evento_saldo, precatorios_eventos_rubricas.participantes_id, precatorios_eventos_rubricas.precatorio_participantes_id
  • Sort Method: quicksort Memory: 32kB
302. 0.056 9.590 ↓ 6.0 18 7

Subquery Scan on precatorios_eventos_rubricas (cost=200.00..200.04 rows=3 width=151) (actual time=1.363..1.370 rows=18 loops=7)

303. 1.869 9.534 ↓ 6.0 18 7

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.361..1.362 rows=18 loops=7)

  • Sort Key: precatorios_9.id, participantes_2.nome, tipo_papeis.descricao, evento_financeiros_1.data_evento, evento_financeiros_1.id, configuracao_rubrica_precatorios.ordem_apresentacao
  • Sort Method: quicksort Memory: 40kB
304. 0.351 7.665 ↓ 6.0 18 7

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.908..1.095 rows=18 loops=7)

305. 0.693 7.056 ↓ 6.0 18 7

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.891..1.008 rows=18 loops=7)

  • Hash Cond: ((configuracao_rubrica_precatorios.precatorio_id = precatorios_9.id) AND (configuracao_rubrica_precatorios.tipo_rubrica_id = tipo_rubricas.id))
306. 0.343 0.343 ↑ 1.0 793 7

Seq Scan on configuracao_rubrica_precatorios (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.049 rows=793 loops=7)

307. 0.091 6.020 ↓ 6.0 18 7

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.860..0.860 rows=18 loops=7)

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
308. 0.137 5.929 ↓ 6.0 18 7

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.248..0.847 rows=18 loops=7)

309. 0.042 5.663 ↓ 6.0 18 7

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.243..0.809 rows=18 loops=7)

310. 0.028 0.154 ↑ 1.0 1 7

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.018..0.022 rows=1 loops=7)

  • Join Filter: (precatorio_participantes_1.tipo_papel_id = tipo_papeis.id)
  • Rows Removed by Join Filter: 5
311. 0.021 0.119 ↑ 1.0 1 7

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.014..0.017 rows=1 loops=7)

312. 0.014 0.077 ↑ 1.0 1 7

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.010..0.011 rows=1 loops=7)

313. 0.042 0.042 ↑ 1.0 1 7

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_1 (cost=0.28..8.30 rows=1 width=48) (actual time=0.006..0.006 rows=1 loops=7)

  • Index Cond: (id = tab1.precatorio_participantes_id)
314. 0.021 0.021 ↑ 1.0 1 7

Index Scan using precatorios_pkey on precatorios precatorios_9 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=7)

  • Index Cond: (id = precatorio_participantes_1.precatorio_id)
315. 0.021 0.021 ↑ 1.0 1 7

Index Scan using participantes_pkey on participantes participantes_2 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=7)

  • Index Cond: (id = precatorio_participantes_1.participante_id)
316. 0.007 0.007 ↑ 1.0 6 7

Seq Scan on tipo_papeis (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=7)

317. 0.182 5.467 ↓ 6.0 18 7

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.223..0.781 rows=18 loops=7)

  • Join Filter: (evento_financeiros_1.tipo_evento_financeiro_id = tipo_evento_financeiros_1.id)
  • Rows Removed by Join Filter: 80
318. 2.618 5.285 ↓ 4.2 25 7

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.218..0.755 rows=25 loops=7)

  • Hash Cond: (rubrica_eventos.evento_financeiro_id = evento_financeiros_1.id)
319. 1.890 1.890 ↑ 1.0 3,944 7

Seq Scan on rubrica_eventos (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.270 rows=3,944 loops=7)

320. 0.014 0.777 ↓ 2.0 4 7

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.111..0.111 rows=4 loops=7)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
321. 0.763 0.763 ↓ 2.0 4 7

Seq Scan on evento_financeiros evento_financeiros_1 (cost=0.00..33.42 rows=2 width=37) (actual time=0.021..0.109 rows=4 loops=7)

  • Filter: (precatorio_participante_id = tab1.precatorio_participantes_id)
  • Rows Removed by Filter: 1230
322. 0.000 0.000 ↑ 1.0 4 172

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=172)

323. 0.003 0.003 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_1 (cost=0.00..1.09 rows=4 width=31) (actual time=0.002..0.003 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
324. 0.129 0.129 ↑ 1.0 1 129

Index Scan using tipo_rubricas_pkey on tipo_rubricas (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=129)

  • Index Cond: (id = rubrica_eventos.tipo_rubrica_id)
325. 0.258 0.258 ↑ 1.0 1 129

Index Scan using processo_principais_pkey on processo_principais processo_principais_9 (cost=0.28..0.38 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=129)

  • Index Cond: (id = precatorios_9.processo_principal_id)
326. 0.360 774.360 ↑ 1.0 1 360

Aggregate (cost=816.96..816.97 rows=1 width=1) (actual time=2.150..2.151 rows=1 loops=360)

327. 1.080 774.000 ↓ 0.0 0 360

Sort (cost=816.94..816.95 rows=1 width=151) (actual time=2.150..2.150 rows=0 loops=360)

  • Sort Key: tab1_1.numero_processo_principal, tab1_1.participantes_nome
  • Sort Method: quicksort Memory: 25kB
328. 0.340 772.920 ↓ 0.0 0 360

Subquery Scan on tab1_1 (cost=416.30..816.93 rows=1 width=151) (actual time=2.110..2.147 rows=0 loops=360)

  • Filter: (tab1_1.data_evento_id = (SubPlan 4))
  • Rows Removed by Filter: 0
329. 2.880 747.000 ↓ 0.0 0 360

GroupAggregate (cost=416.30..416.40 rows=2 width=151) (actual time=2.075..2.075 rows=0 loops=360)

  • Filter: CASE WHEN (sum(precatorios_eventos_rubricas_3.valor_com_sinal) <= 0::double precision) THEN true ELSE false END
  • Rows Removed by Filter: 3
330. 32.400 744.120 ↓ 5.5 11 360

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=2.066..2.067 rows=11 loops=360)

  • Sort Key: precatorios_eventos_rubricas_3.precatorios_id, precatorios_eventos_rubricas_3.participantes_nome, precatorios_eventos_rubricas_3.data_evento, precatorios_eventos_rubricas_3.data_evento_id, precatorios_eventos_rubricas_3.numero_processo_principal, precatorios_eventos_rubricas_3.evento_financeiros_id, precatorios_eventos_rubricas_3.tipo_evento_descricao, precatorios_eventos_rubricas_3.tipo_evento_calculavel, precatorios_eventos_rubricas_3.tipo_evento_pagamento, precatorios_eventos_rubricas_3.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_3.tipo_evento_saldo, precatorios_eventos_rubricas_3.participantes_id, precatorios_eventos_rubricas_3.precatorio_participantes_id
  • Sort Method: quicksort Memory: 56kB
331. 1.800 711.720 ↓ 5.5 11 360

Subquery Scan on precatorios_eventos_rubricas_3 (cost=416.26..416.29 rows=2 width=151) (actual time=1.973..1.977 rows=11 loops=360)

332. 43.200 709.920 ↓ 5.5 11 360

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=1.972..1.972 rows=11 loops=360)

  • Sort Key: participantes_5.nome, tipo_papeis_3.descricao, evento_financeiros_4.data_evento, evento_financeiros_4.id, configuracao_rubrica_precatorios_3.ordem_apresentacao
  • Sort Method: quicksort Memory: 86kB
333. 13.792 666.720 ↓ 5.5 11 360

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.463..1.852 rows=11 loops=360)

  • Join Filter: ((precatorios_12.id = configuracao_rubrica_precatorios_3.precatorio_id) AND (tipo_rubricas_3.id = configuracao_rubrica_precatorios_3.tipo_rubrica_id))
  • Rows Removed by Join Filter: 39
334. 0.392 625.320 ↓ 5.5 11 360

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.413..1.737 rows=11 loops=360)

335. 1.440 617.040 ↓ 5.5 11 360

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.409..1.714 rows=11 loops=360)

336. 2.160 2.160 ↑ 1.0 1 360

Index Scan using precatorios_pkey on precatorios precatorios_12 (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=360)

  • Index Cond: (id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
337. 1.832 613.440 ↓ 5.5 11 360

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.403..1.704 rows=11 loops=360)

338. 125.280 603.720 ↓ 5.5 11 360

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.396..1.677 rows=11 loops=360)

  • Hash Cond: (rubrica_eventos_3.evento_financeiro_id = evento_financeiros_4.id)
339. 87.480 87.480 ↑ 1.0 3,944 360

Seq Scan on rubrica_eventos rubrica_eventos_3 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.243 rows=3,944 loops=360)

340. 1.080 390.960 ↓ 3.0 3 360

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.086..1.086 rows=3 loops=360)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
341. 2.726 389.880 ↓ 3.0 3 360

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=0.930..1.083 rows=3 loops=360)

  • Join Filter: (precatorio_participantes_4.tipo_papel_id = tipo_papeis_3.id)
  • Rows Removed by Join Filter: 17
342. 0.772 385.920 ↓ 3.0 3 360

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=0.926..1.072 rows=3 loops=360)

343. 1.492 382.680 ↓ 3.0 3 360

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=0.922..1.063 rows=3 loops=360)

344. 31.680 378.720 ↓ 3.0 3 360

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=0.915..1.052 rows=3 loops=360)

  • Hash Cond: (evento_financeiros_4.precatorio_participante_id = precatorio_participantes_4.id)
345. 71.280 71.280 ↑ 1.0 1,234 360

Seq Scan on evento_financeiros evento_financeiros_4 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.001..0.198 rows=1,234 loops=360)

346. 1.080 275.760 ↑ 1.0 4 360

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.766..0.766 rows=4 loops=360)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
347. 274.680 274.680 ↑ 1.0 4 360

Seq Scan on precatorio_participantes precatorio_participantes_4 (cost=0.00..213.03 rows=4 width=48) (actual time=0.143..0.763 rows=4 loops=360)

  • Filter: (precatorio_id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
  • Rows Removed by Filter: 7518
348. 2.468 2.468 ↑ 1.0 1 1,234

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_4 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=1,234)

  • Index Cond: (id = evento_financeiros_4.tipo_evento_financeiro_id)
349. 2.468 2.468 ↑ 1.0 1 1,234

Index Scan using participantes_pkey on participantes participantes_5 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_4.participante_id)
350. 1.234 1.234 ↑ 1.0 6 1,234

Seq Scan on tipo_papeis tipo_papeis_3 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=1,234)

351. 7.888 7.888 ↑ 1.0 1 3,944

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_3 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=3,944)

  • Index Cond: (id = rubrica_eventos_3.tipo_rubrica_id)
352. 7.888 7.888 ↑ 1.0 1 3,944

Index Scan using processo_principais_pkey on processo_principais processo_principais_12 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=3,944)

  • Index Cond: (id = precatorios_12.processo_principal_id)
353. 2.408 27.608 ↓ 2.5 5 3,944

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.004..0.007 rows=5 loops=3,944)

354. 25.200 25.200 ↑ 1.0 2 360

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_3 (cost=0.00..17.91 rows=2 width=12) (actual time=0.038..0.070 rows=2 loops=360)

  • Filter: (precatorio_id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
  • Rows Removed by Filter: 791
355.          

SubPlan (for Subquery Scan)

356. 0.080 25.580 ↑ 1.0 1 20

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.279..1.279 rows=1 loops=20)

357. 0.240 25.500 ↑ 1.0 3 20

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.270..1.275 rows=3 loops=20)

358. 2.160 25.260 ↓ 4.0 12 20

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.263..1.263 rows=12 loops=20)

  • Sort Key: precatorios_eventos_rubricas_2.precatorios_id, precatorios_eventos_rubricas_2.participantes_nome, precatorios_eventos_rubricas_2.data_evento, precatorios_eventos_rubricas_2.data_evento_id, precatorios_eventos_rubricas_2.numero_processo_principal, precatorios_eventos_rubricas_2.evento_financeiros_id, precatorios_eventos_rubricas_2.tipo_evento_descricao, precatorios_eventos_rubricas_2.tipo_evento_calculavel, precatorios_eventos_rubricas_2.tipo_evento_pagamento, precatorios_eventos_rubricas_2.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_2.tipo_evento_saldo, precatorios_eventos_rubricas_2.participantes_id, precatorios_eventos_rubricas_2.precatorio_participantes_id
  • Sort Method: quicksort Memory: 32kB
359. 0.120 23.100 ↓ 4.0 12 20

Subquery Scan on precatorios_eventos_rubricas_2 (cost=200.00..200.04 rows=3 width=151) (actual time=1.151..1.155 rows=12 loops=20)

360. 3.100 22.980 ↓ 4.0 12 20

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.148..1.149 rows=12 loops=20)

  • Sort Key: precatorios_11.id, participantes_4.nome, tipo_papeis_2.descricao, evento_financeiros_3.data_evento, evento_financeiros_3.id, configuracao_rubrica_precatorios_2.ordem_apresentacao
  • Sort Method: quicksort Memory: 40kB
361. 0.738 19.880 ↓ 4.0 12 20

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.823..0.994 rows=12 loops=20)

362. 1.980 18.660 ↓ 4.0 12 20

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.807..0.933 rows=12 loops=20)

  • Hash Cond: ((configuracao_rubrica_precatorios_2.precatorio_id = precatorios_11.id) AND (configuracao_rubrica_precatorios_2.tipo_rubrica_id = tipo_rubricas_2.id))
363. 0.960 0.960 ↑ 1.0 793 20

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_2 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.048 rows=793 loops=20)

364. 0.180 15.720 ↓ 4.0 12 20

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.786..0.786 rows=12 loops=20)

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
365. 0.239 15.540 ↓ 4.0 12 20

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.190..0.777 rows=12 loops=20)

366. 0.060 15.060 ↓ 4.0 12 20

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.185..0.753 rows=12 loops=20)

367. 0.080 0.420 ↑ 1.0 1 20

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.017..0.021 rows=1 loops=20)

  • Join Filter: (precatorio_participantes_3.tipo_papel_id = tipo_papeis_2.id)
  • Rows Removed by Join Filter: 5
368. 0.040 0.320 ↑ 1.0 1 20

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.014..0.016 rows=1 loops=20)

369. 0.040 0.220 ↑ 1.0 1 20

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.010..0.011 rows=1 loops=20)

370. 0.120 0.120 ↑ 1.0 1 20

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_3 (cost=0.28..8.30 rows=1 width=48) (actual time=0.006..0.006 rows=1 loops=20)

  • Index Cond: (id = tab1_1.precatorio_participantes_id)
371. 0.060 0.060 ↑ 1.0 1 20

Index Scan using precatorios_pkey on precatorios precatorios_11 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=20)

  • Index Cond: (id = precatorio_participantes_3.precatorio_id)
372. 0.060 0.060 ↑ 1.0 1 20

Index Scan using participantes_pkey on participantes participantes_4 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=20)

  • Index Cond: (id = precatorio_participantes_3.participante_id)
373. 0.020 0.020 ↑ 1.0 6 20

Seq Scan on tipo_papeis tipo_papeis_2 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=20)

374. 0.380 14.580 ↓ 4.0 12 20

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.166..0.729 rows=12 loops=20)

  • Join Filter: (evento_financeiros_3.tipo_evento_financeiro_id = tipo_evento_financeiros_3.id)
  • Rows Removed by Join Filter: 52
375. 7.000 14.200 ↓ 2.7 16 20

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.162..0.710 rows=16 loops=20)

  • Hash Cond: (rubrica_eventos_2.evento_financeiro_id = evento_financeiros_3.id)
376. 4.940 4.940 ↑ 1.0 3,944 20

Seq Scan on rubrica_eventos rubrica_eventos_2 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.247 rows=3,944 loops=20)

377. 0.060 2.260 ↓ 2.0 4 20

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.113..0.113 rows=4 loops=20)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
378. 2.200 2.200 ↓ 2.0 4 20

Seq Scan on evento_financeiros evento_financeiros_3 (cost=0.00..33.42 rows=2 width=37) (actual time=0.010..0.110 rows=4 loops=20)

  • Filter: (precatorio_participante_id = tab1_1.precatorio_participantes_id)
  • Rows Removed by Filter: 1230
379. 0.000 0.000 ↑ 1.0 4 320

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=320)

380. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_3 (cost=0.00..1.09 rows=4 width=31) (actual time=0.002..0.005 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
381. 0.241 0.241 ↑ 1.0 1 241

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_2 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=241)

  • Index Cond: (id = rubrica_eventos_2.tipo_rubrica_id)
382. 0.482 0.482 ↑ 1.0 1 241

Index Scan using processo_principais_pkey on processo_principais processo_principais_11 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=241)

  • Index Cond: (id = precatorios_11.processo_principal_id)
383. 0.000 8,397.939 ↓ 0.0 0 2,799,313

GroupAggregate (cost=2,138.95..2,956.29 rows=1 width=175) (actual time=0.003..0.003 rows=0 loops=2,799,313)

384. 0.000 8,397.939 ↓ 0.0 0 2,799,313

Result (cost=2,138.95..2,956.27 rows=1 width=175) (actual time=0.003..0.003 rows=0 loops=2,799,313)

  • One-Time Filter: (prec_part.precatorio_id = precatorios_6.id)
385. 2.334 8,599.554 ↓ 0.0 0 1,467

Nested Loop (cost=2,138.95..2,956.27 rows=1 width=175) (actual time=4.944..5.862 rows=0 loops=1,467)

  • Join Filter: (ult_ev2.data_evento = (max(tab1_5.data_evento)))
  • Rows Removed by Join Filter: 0
386. 4.401 3,409.308 ↓ 0.0 0 1,467

Subquery Scan on ult_ev2 (cost=816.93..816.95 rows=1 width=187) (actual time=2.323..2.324 rows=0 loops=1,467)

387. 7.335 3,404.907 ↓ 0.0 0 1,467

Sort (cost=816.93..816.94 rows=1 width=151) (actual time=2.321..2.321 rows=0 loops=1,467)

  • Sort Key: tab1_4.numero_processo_principal, tab1_4.participantes_nome
  • Sort Method: quicksort Memory: 25kB
388. 5.112 3,397.572 ↓ 0.0 0 1,467

Subquery Scan on tab1_4 (cost=416.30..816.92 rows=1 width=151) (actual time=1.920..2.316 rows=0 loops=1,467)

  • Filter: (tab1_4.data_evento_id = (SubPlan 8))
  • Rows Removed by Filter: 0
389. 5.868 2,053.800 ↑ 2.0 1 1,467

GroupAggregate (cost=416.30..416.39 rows=2 width=151) (actual time=1.398..1.400 rows=1 loops=1,467)

390. 41.076 2,047.932 ↓ 1.5 3 1,467

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=1.396..1.396 rows=3 loops=1,467)

  • Sort Key: precatorios_eventos_rubricas_10.precatorios_id, precatorios_eventos_rubricas_10.participantes_nome, precatorios_eventos_rubricas_10.data_evento, precatorios_eventos_rubricas_10.data_evento_id, precatorios_eventos_rubricas_10.numero_processo_principal, precatorios_eventos_rubricas_10.evento_financeiros_id, precatorios_eventos_rubricas_10.tipo_evento_descricao, precatorios_eventos_rubricas_10.tipo_evento_calculavel, precatorios_eventos_rubricas_10.tipo_evento_pagamento, precatorios_eventos_rubricas_10.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_10.tipo_evento_saldo, precatorios_eventos_rubricas_10.participantes_id, precatorios_eventos_rubricas_10.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
391. 2.934 2,006.856 ↓ 1.5 3 1,467

Subquery Scan on precatorios_eventos_rubricas_10 (cost=416.26..416.29 rows=2 width=151) (actual time=1.367..1.368 rows=3 loops=1,467)

392. 46.944 2,003.922 ↓ 1.5 3 1,467

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=1.365..1.366 rows=3 loops=1,467)

  • Sort Key: participantes_13.nome, tipo_papeis_10.descricao, evento_financeiros_11.data_evento, evento_financeiros_11.id, configuracao_rubrica_precatorios_10.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
393. 15.301 1,956.978 ↓ 1.5 3 1,467

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.237..1.334 rows=3 loops=1,467)

  • Join Filter: ((precatorios_20.id = configuracao_rubrica_precatorios_10.precatorio_id) AND (tipo_rubricas_10.id = configuracao_rubrica_precatorios_10.tipo_rubrica_id))
  • Rows Removed by Join Filter: 9
394. 2.725 1,911.501 ↓ 1.5 3 1,467

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.222..1.303 rows=3 loops=1,467)

395. 4.401 1,901.232 ↓ 1.5 3 1,467

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.220..1.296 rows=3 loops=1,467)

396. 8.802 8.802 ↑ 1.0 1 1,467

Index Scan using precatorios_pkey on precatorios precatorios_20 (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=1,467)

  • Index Cond: (id = prec_part.precatorio_id)
397. 8.593 1,888.029 ↓ 1.5 3 1,467

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.212..1.287 rows=3 loops=1,467)

398. 133.377 1,871.892 ↓ 1.5 3 1,467

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.206..1.276 rows=3 loops=1,467)

  • Hash Cond: (rubrica_eventos_10.evento_financeiro_id = evento_financeiros_11.id)
399. 89.607 89.607 ↑ 1.0 3,933 357

Seq Scan on rubrica_eventos rubrica_eventos_10 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.251 rows=3,933 loops=357)

400. 2.934 1,648.908 ↑ 1.0 1 1,467

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.124..1.124 rows=1 loops=1,467)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
401. 4.662 1,645.974 ↑ 1.0 1 1,467

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=1.084..1.122 rows=1 loops=1,467)

  • Join Filter: (precatorio_participantes_13.tipo_papel_id = tipo_papeis_10.id)
  • Rows Removed by Join Filter: 4
402. 1.989 1,640.106 ↑ 1.0 1 1,467

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=1.082..1.118 rows=1 loops=1,467)

403. 6.390 1,635.705 ↑ 1.0 1 1,467

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=1.080..1.115 rows=1 loops=1,467)

404. 134.964 1,626.903 ↑ 1.0 1 1,467

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=1.075..1.109 rows=1 loops=1,467)

  • Hash Cond: (evento_financeiros_11.precatorio_participante_id = precatorio_participantes_13.id)
405. 303.669 303.669 ↑ 1.0 1,234 1,467

Seq Scan on evento_financeiros evento_financeiros_11 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.001..0.207 rows=1,234 loops=1,467)

406. 4.401 1,188.270 ↑ 1.0 4 1,467

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.810..0.810 rows=4 loops=1,467)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
407. 1,183.869 1,183.869 ↑ 1.0 4 1,467

Seq Scan on precatorio_participantes precatorio_participantes_13 (cost=0.00..213.03 rows=4 width=48) (actual time=0.306..0.807 rows=4 loops=1,467)

  • Filter: (precatorio_id = prec_part.precatorio_id)
  • Rows Removed by Filter: 7518
408. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_11 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = evento_financeiros_11.tipo_evento_financeiro_id)
409. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using participantes_pkey on participantes participantes_13 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_13.participante_id)
410. 1.206 1.206 ↑ 1.0 6 1,206

Seq Scan on tipo_papeis tipo_papeis_10 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=1,206)

411. 7.544 7.544 ↑ 1.0 1 3,772

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_10 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=3,772)

  • Index Cond: (id = rubrica_eventos_10.tipo_rubrica_id)
412. 7.544 7.544 ↑ 1.0 1 3,772

Index Scan using processo_principais_pkey on processo_principais processo_principais_20 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=3,772)

  • Index Cond: (id = precatorios_20.processo_principal_id)
413. 3.832 30.176 ↓ 2.0 4 3,772

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.004..0.008 rows=4 loops=3,772)

414. 26.344 26.344 ↑ 1.0 2 356

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_10 (cost=0.00..17.91 rows=2 width=12) (actual time=0.041..0.074 rows=2 loops=356)

  • Filter: (precatorio_id = prec_part.precatorio_id)
  • Rows Removed by Filter: 791
415.          

SubPlan (for Subquery Scan)

416. 3.618 1,338.660 ↑ 1.0 1 1,206

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.110..1.110 rows=1 loops=1,206)

417. 8.442 1,335.042 ↑ 1.5 2 1,206

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.105..1.107 rows=2 loops=1,206)

418. 73.566 1,326.600 ↓ 2.0 6 1,206

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.100..1.100 rows=6 loops=1,206)

  • Sort Key: precatorios_eventos_rubricas_6.precatorios_id, precatorios_eventos_rubricas_6.participantes_nome, precatorios_eventos_rubricas_6.data_evento, precatorios_eventos_rubricas_6.data_evento_id, precatorios_eventos_rubricas_6.numero_processo_principal, precatorios_eventos_rubricas_6.evento_financeiros_id, precatorios_eventos_rubricas_6.tipo_evento_descricao, precatorios_eventos_rubricas_6.tipo_evento_calculavel, precatorios_eventos_rubricas_6.tipo_evento_pagamento, precatorios_eventos_rubricas_6.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_6.tipo_evento_saldo, precatorios_eventos_rubricas_6.participantes_id, precatorios_eventos_rubricas_6.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
419. 4.824 1,253.034 ↓ 2.0 6 1,206

Subquery Scan on precatorios_eventos_rubricas_6 (cost=200.00..200.04 rows=3 width=151) (actual time=1.036..1.039 rows=6 loops=1,206)

420. 82.008 1,248.210 ↓ 2.0 6 1,206

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.035..1.035 rows=6 loops=1,206)

  • Sort Key: precatorios_16.id, participantes_9.nome, tipo_papeis_6.descricao, evento_financeiros_7.data_evento, evento_financeiros_7.id, configuracao_rubrica_precatorios_6.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
421. 30.404 1,166.202 ↓ 2.0 6 1,206

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.865..0.967 rows=6 loops=1,206)

422. 116.982 1,120.374 ↓ 2.0 6 1,206

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.850..0.929 rows=6 loops=1,206)

  • Hash Cond: ((configuracao_rubrica_precatorios_6.precatorio_id = precatorios_16.id) AND (configuracao_rubrica_precatorios_6.tipo_rubrica_id = tipo_rubricas_6.id))
423. 62.712 62.712 ↑ 1.0 793 1,206

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_6 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.052 rows=793 loops=1,206)

424. 6.030 940.680 ↓ 2.0 6 1,206

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.780..0.780 rows=6 loops=1,206)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
425. 11.584 934.650 ↓ 2.0 6 1,206

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.458..0.775 rows=6 loops=1,206)

426. 3.618 915.354 ↓ 2.0 6 1,206

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.453..0.759 rows=6 loops=1,206)

427. 3.618 22.914 ↑ 1.0 1 1,206

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.016..0.019 rows=1 loops=1,206)

  • Join Filter: (precatorio_participantes_9.tipo_papel_id = tipo_papeis_6.id)
  • Rows Removed by Join Filter: 5
428. 2.412 18.090 ↑ 1.0 1 1,206

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.013..0.015 rows=1 loops=1,206)

429. 2.412 12.060 ↑ 1.0 1 1,206

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.009..0.010 rows=1 loops=1,206)

430. 6.030 6.030 ↑ 1.0 1 1,206

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_9 (cost=0.28..8.30 rows=1 width=48) (actual time=0.005..0.005 rows=1 loops=1,206)

  • Index Cond: (id = tab1_4.precatorio_participantes_id)
431. 3.618 3.618 ↑ 1.0 1 1,206

Index Scan using precatorios_pkey on precatorios precatorios_16 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_9.precatorio_id)
432. 3.618 3.618 ↑ 1.0 1 1,206

Index Scan using participantes_pkey on participantes participantes_9 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_9.participante_id)
433. 1.206 1.206 ↑ 1.0 6 1,206

Seq Scan on tipo_papeis tipo_papeis_6 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1,206)

434. 12.060 888.822 ↓ 2.0 6 1,206

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.435..0.737 rows=6 loops=1,206)

  • Join Filter: (evento_financeiros_7.tipo_evento_financeiro_id = tipo_evento_financeiros_7.id)
  • Rows Removed by Join Filter: 20
435. 431.748 876.762 ↓ 1.2 7 1,206

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.431..0.727 rows=7 loops=1,206)

  • Hash Cond: (rubrica_eventos_6.evento_financeiro_id = evento_financeiros_7.id)
436. 305.118 305.118 ↑ 1.0 3,944 1,206

Seq Scan on rubrica_eventos rubrica_eventos_6 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.253 rows=3,944 loops=1,206)

437. 2.412 139.896 ↑ 1.0 2 1,206

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.116..0.116 rows=2 loops=1,206)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
438. 137.484 137.484 ↑ 1.0 2 1,206

Seq Scan on evento_financeiros evento_financeiros_7 (cost=0.00..33.42 rows=2 width=37) (actual time=0.058..0.114 rows=2 loops=1,206)

  • Filter: (precatorio_participante_id = tab1_4.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
439. 0.000 0.000 ↑ 1.0 4 7,860

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=7,860)

440. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_7 (cost=0.00..1.09 rows=4 width=31) (actual time=0.003..0.004 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
441. 7.712 7.712 ↑ 1.0 1 7,712

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_6 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=7,712)

  • Index Cond: (id = rubrica_eventos_6.tipo_rubrica_id)
442. 15.424 15.424 ↑ 1.0 1 7,712

Index Scan using processo_principais_pkey on processo_principais processo_principais_16 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=7,712)

  • Index Cond: (id = precatorios_16.processo_principal_id)
443. 94.240 5,187.912 ↑ 1.0 1 589

GroupAggregate (cost=1,322.01..2,139.30 rows=1 width=65) (actual time=8.807..8.808 rows=1 loops=589)

444. 19.254 3,012.146 ↓ 32.5 130 589

Sort (cost=1,322.01..1,322.02 rows=4 width=65) (actual time=5.107..5.114 rows=130 loops=589)

  • Sort Key: tab1_5.numero_processo_principal, tab1_5.precatorios_id, (count(precatorio_participantes_16.credor))
  • Sort Method: quicksort Memory: 25kB
445. 3.560 2,992.892 ↓ 3.5 14 356

Nested Loop Left Join (cost=1,055.32..1,321.97 rows=4 width=65) (actual time=7.202..8.407 rows=14 loops=356)

446. 2.746 2,989.332 ↓ 3.5 14 356

Nested Loop Left Join (cost=1,055.17..1,301.26 rows=4 width=65) (actual time=7.198..8.397 rows=14 loops=356)

447. 4.254 2,976.516 ↓ 3.5 14 356

Nested Loop Left Join (cost=1,054.89..1,268.03 rows=4 width=69) (actual time=7.188..8.361 rows=14 loops=356)

  • Join Filter: (precatorio_participantes_14.precatorio_id = precatorios_22.id)
448. 2.373 2,506.952 ↓ 2.0 2 356

Nested Loop Left Join (cost=1,054.89..1,054.96 rows=1 width=61) (actual time=7.036..7.042 rows=2 loops=356)

  • Join Filter: (precatorios_22.id = tab1_5.precatorios_id)
449. 2.848 2,165.904 ↓ 2.0 2 356

Sort (cost=816.93..816.94 rows=1 width=151) (actual time=6.084..6.084 rows=2 loops=356)

  • Sort Key: tab1_5.numero_processo_principal, tab1_5.participantes_nome
  • Sort Method: quicksort Memory: 25kB
450. 4.318 2,163.056 ↓ 2.0 2 356

Subquery Scan on tab1_5 (cost=416.30..816.92 rows=1 width=151) (actual time=4.425..6.076 rows=2 loops=356)

  • Filter: (tab1_5.data_evento_id = (SubPlan 11))
  • Rows Removed by Filter: 2
451. 4.272 799.576 ↓ 1.5 3 356

GroupAggregate (cost=416.30..416.39 rows=2 width=151) (actual time=2.239..2.246 rows=3 loops=356)

452. 34.176 795.304 ↓ 5.5 11 356

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=2.233..2.234 rows=11 loops=356)

  • Sort Key: precatorios_eventos_rubricas_11.precatorios_id, precatorios_eventos_rubricas_11.participantes_nome, precatorios_eventos_rubricas_11.data_evento, precatorios_eventos_rubricas_11.data_evento_id, precatorios_eventos_rubricas_11.numero_processo_principal, precatorios_eventos_rubricas_11.evento_financeiros_id, precatorios_eventos_rubricas_11.tipo_evento_descricao, precatorios_eventos_rubricas_11.tipo_evento_calculavel, precatorios_eventos_rubricas_11.tipo_evento_pagamento, precatorios_eventos_rubricas_11.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_11.tipo_evento_saldo, precatorios_eventos_rubricas_11.participantes_id, precatorios_eventos_rubricas_11.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
453. 2.492 761.128 ↓ 5.5 11 356

Subquery Scan on precatorios_eventos_rubricas_11 (cost=416.26..416.29 rows=2 width=151) (actual time=2.133..2.138 rows=11 loops=356)

454. 44.144 758.636 ↓ 5.5 11 356

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=2.131..2.131 rows=11 loops=356)

  • Sort Key: participantes_14.nome, tipo_papeis_11.descricao, evento_financeiros_12.data_evento, evento_financeiros_12.id, configuracao_rubrica_precatorios_11.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
455. 15.036 714.492 ↓ 5.5 11 356

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.599..2.007 rows=11 loops=356)

  • Join Filter: ((precatorios_21.id = configuracao_rubrica_precatorios_11.precatorio_id) AND (tipo_rubricas_11.id = configuracao_rubrica_precatorios_11.tipo_rubrica_id))
  • Rows Removed by Join Filter: 36
456. 1.712 669.280 ↓ 5.5 11 356

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.540..1.880 rows=11 loops=356)

457. 2.136 660.024 ↓ 5.5 11 356

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.534..1.854 rows=11 loops=356)

458. 1.780 1.780 ↑ 1.0 1 356

Index Scan using precatorios_pkey on precatorios precatorios_21 (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=356)

  • Index Cond: (id = prec_part.precatorio_id)
459. 4.204 656.108 ↓ 5.5 11 356

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.527..1.843 rows=11 loops=356)

460. 132.788 644.360 ↓ 5.5 11 356

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.515..1.810 rows=11 loops=356)

  • Hash Cond: (rubrica_eventos_11.evento_financeiro_id = evento_financeiros_12.id)
461. 91.492 91.492 ↑ 1.0 3,944 356

Seq Scan on rubrica_eventos rubrica_eventos_11 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.257 rows=3,944 loops=356)

462. 1.424 420.080 ↓ 3.0 3 356

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.180..1.180 rows=3 loops=356)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
463. 3.778 418.656 ↓ 3.0 3 356

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=1.016..1.176 rows=3 loops=356)

  • Join Filter: (precatorio_participantes_15.tipo_papel_id = tipo_papeis_11.id)
  • Rows Removed by Join Filter: 17
464. 1.504 413.672 ↓ 3.0 3 356

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=1.010..1.162 rows=3 loops=356)

465. 2.928 409.756 ↓ 3.0 3 356

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=1.003..1.151 rows=3 loops=356)

466. 33.820 404.416 ↓ 3.0 3 356

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=0.994..1.136 rows=3 loops=356)

  • Hash Cond: (evento_financeiros_12.precatorio_participante_id = precatorio_participantes_15.id)
467. 73.692 73.692 ↑ 1.0 1,234 356

Seq Scan on evento_financeiros evento_financeiros_12 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.002..0.207 rows=1,234 loops=356)

468. 1.424 296.904 ↑ 1.0 4 356

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.834..0.834 rows=4 loops=356)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
469. 295.480 295.480 ↑ 1.0 4 356

Seq Scan on precatorio_participantes precatorio_participantes_15 (cost=0.00..213.03 rows=4 width=48) (actual time=0.156..0.830 rows=4 loops=356)

  • Filter: (precatorio_id = prec_part.precatorio_id)
  • Rows Removed by Filter: 7518
470. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_12 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = evento_financeiros_12.tipo_evento_financeiro_id)
471. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using participantes_pkey on participantes participantes_14 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_15.participante_id)
472. 1.206 1.206 ↑ 1.0 6 1,206

Seq Scan on tipo_papeis tipo_papeis_11 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=1,206)

473. 7.544 7.544 ↑ 1.0 1 3,772

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_11 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=3,772)

  • Index Cond: (id = rubrica_eventos_11.tipo_rubrica_id)
474. 7.544 7.544 ↑ 1.0 1 3,772

Index Scan using processo_principais_pkey on processo_principais processo_principais_21 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=3,772)

  • Index Cond: (id = precatorios_21.processo_principal_id)
475. 3.476 30.176 ↓ 2.0 4 3,772

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.004..0.008 rows=4 loops=3,772)

476. 26.700 26.700 ↑ 1.0 2 356

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_11 (cost=0.00..17.91 rows=2 width=12) (actual time=0.041..0.075 rows=2 loops=356)

  • Filter: (precatorio_id = prec_part.precatorio_id)
  • Rows Removed by Filter: 791
477.          

SubPlan (for Subquery Scan)

478. 3.618 1,359.162 ↑ 1.0 1 1,206

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.127..1.127 rows=1 loops=1,206)

479. 8.442 1,355.544 ↑ 1.5 2 1,206

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.122..1.124 rows=2 loops=1,206)

480. 75.978 1,347.102 ↓ 2.0 6 1,206

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.116..1.117 rows=6 loops=1,206)

  • Sort Key: precatorios_eventos_rubricas_9.precatorios_id, precatorios_eventos_rubricas_9.participantes_nome, precatorios_eventos_rubricas_9.data_evento, precatorios_eventos_rubricas_9.data_evento_id, precatorios_eventos_rubricas_9.numero_processo_principal, precatorios_eventos_rubricas_9.evento_financeiros_id, precatorios_eventos_rubricas_9.tipo_evento_descricao, precatorios_eventos_rubricas_9.tipo_evento_calculavel, precatorios_eventos_rubricas_9.tipo_evento_pagamento, precatorios_eventos_rubricas_9.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_9.tipo_evento_saldo, precatorios_eventos_rubricas_9.participantes_id, precatorios_eventos_rubricas_9.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
481. 3.618 1,271.124 ↓ 2.0 6 1,206

Subquery Scan on precatorios_eventos_rubricas_9 (cost=200.00..200.04 rows=3 width=151) (actual time=1.052..1.054 rows=6 loops=1,206)

482. 83.214 1,267.506 ↓ 2.0 6 1,206

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.050..1.051 rows=6 loops=1,206)

  • Sort Key: precatorios_19.id, participantes_12.nome, tipo_papeis_9.descricao, evento_financeiros_10.data_evento, evento_financeiros_10.id, configuracao_rubrica_precatorios_9.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
483. 31.610 1,184.292 ↓ 2.0 6 1,206

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.878..0.982 rows=6 loops=1,206)

484. 121.806 1,137.258 ↓ 2.0 6 1,206

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.864..0.943 rows=6 loops=1,206)

  • Hash Cond: ((configuracao_rubrica_precatorios_9.precatorio_id = precatorios_19.id) AND (configuracao_rubrica_precatorios_9.tipo_rubrica_id = tipo_rubricas_9.id))
485. 60.300 60.300 ↑ 1.0 793 1,206

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_9 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.050 rows=793 loops=1,206)

486. 7.236 955.152 ↓ 2.0 6 1,206

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.792..0.792 rows=6 loops=1,206)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
487. 2.666 947.916 ↓ 2.0 6 1,206

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.464..0.786 rows=6 loops=1,206)

488. 3.618 929.826 ↓ 2.0 6 1,206

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.459..0.771 rows=6 loops=1,206)

489. 3.618 22.914 ↑ 1.0 1 1,206

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.016..0.019 rows=1 loops=1,206)

  • Join Filter: (precatorio_participantes_12.tipo_papel_id = tipo_papeis_9.id)
  • Rows Removed by Join Filter: 5
490. 2.412 18.090 ↑ 1.0 1 1,206

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.013..0.015 rows=1 loops=1,206)

491. 2.412 12.060 ↑ 1.0 1 1,206

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.009..0.010 rows=1 loops=1,206)

492. 6.030 6.030 ↑ 1.0 1 1,206

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_12 (cost=0.28..8.30 rows=1 width=48) (actual time=0.005..0.005 rows=1 loops=1,206)

  • Index Cond: (id = tab1_5.precatorio_participantes_id)
493. 3.618 3.618 ↑ 1.0 1 1,206

Index Scan using precatorios_pkey on precatorios precatorios_19 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_12.precatorio_id)
494. 3.618 3.618 ↑ 1.0 1 1,206

Index Scan using participantes_pkey on participantes participantes_12 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_12.participante_id)
495. 1.206 1.206 ↑ 1.0 6 1,206

Seq Scan on tipo_papeis tipo_papeis_9 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1,206)

496. 13.266 903.294 ↓ 2.0 6 1,206

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.441..0.749 rows=6 loops=1,206)

  • Join Filter: (evento_financeiros_10.tipo_evento_financeiro_id = tipo_evento_financeiros_10.id)
  • Rows Removed by Join Filter: 20
497. 436.572 890.028 ↓ 1.2 7 1,206

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.437..0.738 rows=7 loops=1,206)

  • Hash Cond: (rubrica_eventos_9.evento_financeiro_id = evento_financeiros_10.id)
498. 309.942 309.942 ↑ 1.0 3,944 1,206

Seq Scan on rubrica_eventos rubrica_eventos_9 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.257 rows=3,944 loops=1,206)

499. 3.618 143.514 ↑ 1.0 2 1,206

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.119..0.119 rows=2 loops=1,206)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
500. 139.896 139.896 ↑ 1.0 2 1,206

Seq Scan on evento_financeiros evento_financeiros_10 (cost=0.00..33.42 rows=2 width=37) (actual time=0.059..0.116 rows=2 loops=1,206)

  • Filter: (precatorio_participante_id = tab1_5.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
501. 0.000 0.000 ↑ 1.0 4 7,860

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=7,860)

502. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_10 (cost=0.00..1.09 rows=4 width=31) (actual time=0.002..0.005 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
503. 15.424 15.424 ↑ 1.0 1 7,712

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_9 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=7,712)

  • Index Cond: (id = rubrica_eventos_9.tipo_rubrica_id)
504. 15.424 15.424 ↑ 1.0 1 7,712

Index Scan using processo_principais_pkey on processo_principais processo_principais_19 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=7,712)

  • Index Cond: (id = precatorios_19.processo_principal_id)
505. 4.123 338.675 ↑ 1.0 1 589

GroupAggregate (cost=237.96..237.99 rows=1 width=62) (actual time=0.575..0.575 rows=1 loops=589)

506. 3.828 334.552 ↓ 7.0 7 589

Sort (cost=237.96..237.97 rows=1 width=62) (actual time=0.567..0.568 rows=7 loops=589)

  • Sort Key: processo_principais_22.numero_processo, precatorios_22.id
  • Sort Method: quicksort Memory: 25kB
507. 1.684 330.724 ↓ 2.0 2 356

Nested Loop (cost=0.84..237.95 rows=1 width=62) (actual time=0.236..0.929 rows=2 loops=356)

508. 1.780 326.808 ↓ 2.0 2 356

Nested Loop (cost=0.56..229.64 rows=1 width=42) (actual time=0.229..0.918 rows=2 loops=356)

509. 1.068 3.916 ↑ 1.0 1 356

Nested Loop (cost=0.56..16.61 rows=1 width=33) (actual time=0.010..0.011 rows=1 loops=356)

510. 1.780 1.780 ↑ 1.0 1 356

Index Scan using precatorios_pkey on precatorios precatorios_22 (cost=0.28..8.29 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=356)

  • Index Cond: (id = prec_part.precatorio_id)
511. 1.068 1.068 ↑ 1.0 1 356

Index Scan using processo_principais_pkey on processo_principais processo_principais_22 (cost=0.28..8.30 rows=1 width=33) (actual time=0.002..0.003 rows=1 loops=356)

  • Index Cond: (id = precatorios_22.processo_principal_id)
512. 321.112 321.112 ↓ 2.0 2 356

Seq Scan on precatorio_participantes precatorio_participantes_16 (cost=0.00..213.03 rows=1 width=17) (actual time=0.215..0.902 rows=2 loops=356)

  • Filter: (credor AND (precatorio_id = prec_part.precatorio_id))
  • Rows Removed by Filter: 7520
513. 2.232 2.232 ↑ 1.0 1 744

Index Scan using participantes_pkey on participantes participantes_15 (cost=0.28..8.30 rows=1 width=36) (actual time=0.003..0.003 rows=1 loops=744)

  • Index Cond: (id = precatorio_participantes_16.participante_id)
514. 465.310 465.310 ↓ 2.2 9 589

Seq Scan on precatorio_participantes precatorio_participantes_14 (cost=0.00..213.03 rows=4 width=24) (actual time=0.126..0.790 rows=9 loops=589)

  • Filter: (precatorio_id = prec_part.precatorio_id)
  • Rows Removed by Filter: 7513
515. 10.070 10.070 ↑ 1.0 1 5,035

Index Scan using rpvs_pkey on rpvs rpvs_1 (cost=0.28..8.30 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=5,035)

  • Index Cond: (id = precatorio_participantes_14.rpv_id)
516. 0.000 0.000 ↓ 0.0 0 5,035

Index Scan using orcamentarios_pkey on orcamentarios orcamentarios_1 (cost=0.15..5.17 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=5,035)

  • Index Cond: (id = precatorio_participantes_14.orcamentario_id)
517.          

SubPlan (for GroupAggregate)

518. 1.178 2,081.526 ↑ 1.0 1 589

Aggregate (cost=816.96..816.97 rows=1 width=1) (actual time=3.534..3.534 rows=1 loops=589)

519. 2.945 2,080.348 ↓ 0.0 0 589

Sort (cost=816.94..816.95 rows=1 width=151) (actual time=3.532..3.532 rows=0 loops=589)

  • Sort Key: tab1_3.numero_processo_principal, tab1_3.participantes_nome
  • Sort Method: quicksort Memory: 25kB
520. 0.851 2,077.403 ↓ 0.0 0 589

Subquery Scan on tab1_3 (cost=416.30..816.93 rows=1 width=151) (actual time=3.471..3.527 rows=0 loops=589)

  • Filter: (tab1_3.data_evento_id = (SubPlan 9))
  • Rows Removed by Filter: 0
521. 19.437 2,026.749 ↓ 0.0 0 589

GroupAggregate (cost=416.30..416.40 rows=2 width=151) (actual time=3.441..3.441 rows=0 loops=589)

  • Filter: CASE WHEN (sum(precatorios_eventos_rubricas_8.valor_com_sinal) <= 0::double precision) THEN true ELSE false END
  • Rows Removed by Filter: 11
522. 249.736 2,007.312 ↓ 25.0 50 589

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=3.405..3.408 rows=50 loops=589)

  • Sort Key: precatorios_eventos_rubricas_8.precatorios_id, precatorios_eventos_rubricas_8.participantes_nome, precatorios_eventos_rubricas_8.data_evento, precatorios_eventos_rubricas_8.data_evento_id, precatorios_eventos_rubricas_8.numero_processo_principal, precatorios_eventos_rubricas_8.evento_financeiros_id, precatorios_eventos_rubricas_8.tipo_evento_descricao, precatorios_eventos_rubricas_8.tipo_evento_calculavel, precatorios_eventos_rubricas_8.tipo_evento_pagamento, precatorios_eventos_rubricas_8.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_8.tipo_evento_saldo, precatorios_eventos_rubricas_8.participantes_id, precatorios_eventos_rubricas_8.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
523. 11.191 1,757.576 ↓ 25.0 50 589

Subquery Scan on precatorios_eventos_rubricas_8 (cost=416.26..416.29 rows=2 width=151) (actual time=2.964..2.984 rows=50 loops=589)

524. 339.853 1,746.385 ↓ 25.0 50 589

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=2.962..2.965 rows=50 loops=589)

  • Sort Key: participantes_11.nome, tipo_papeis_8.descricao, evento_financeiros_9.data_evento, evento_financeiros_9.id, configuracao_rubrica_precatorios_8.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
525. 95.089 1,406.532 ↓ 25.0 50 589

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.631..2.388 rows=50 loops=589)

  • Join Filter: ((precatorios_18.id = configuracao_rubrica_precatorios_8.precatorio_id) AND (tipo_rubricas_8.id = configuracao_rubrica_precatorios_8.tipo_rubrica_id))
  • Rows Removed by Join Filter: 190
526. 27.813 1,252.803 ↓ 25.0 50 589

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.575..2.127 rows=50 loops=589)

527. 7.068 1,195.670 ↓ 25.0 50 589

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.569..2.030 rows=50 loops=589)

528. 3.534 3.534 ↑ 1.0 1 589

Index Scan using precatorios_pkey on precatorios precatorios_18 (cost=0.28..8.29 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=589)

  • Index Cond: (id = tab1_5.precatorios_id)
529. 7.328 1,185.068 ↓ 25.0 50 589

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.561..2.012 rows=50 loops=589)

530. 232.066 1,119.100 ↓ 25.0 50 589

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.550..1.900 rows=50 loops=589)

  • Hash Cond: (rubrica_eventos_8.evento_financeiro_id = evento_financeiros_9.id)
531. 161.975 161.975 ↑ 1.0 3,944 589

Seq Scan on rubrica_eventos rubrica_eventos_8 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.275 rows=3,944 loops=589)

532. 5.301 725.059 ↓ 12.0 12 589

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.231..1.231 rows=12 loops=589)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
533. 12.064 719.758 ↓ 12.0 12 589

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=1.004..1.222 rows=12 loops=589)

  • Join Filter: (precatorio_participantes_11.tipo_papel_id = tipo_papeis_8.id)
  • Rows Removed by Join Filter: 58
534. 1.746 700.910 ↓ 12.0 12 589

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=0.998..1.190 rows=12 loops=589)

535. 9.708 685.596 ↓ 12.0 12 589

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=0.993..1.164 rows=12 loops=589)

536. 57.722 669.104 ↓ 12.0 12 589

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=0.983..1.136 rows=12 loops=589)

  • Hash Cond: (evento_financeiros_9.precatorio_participante_id = precatorio_participantes_11.id)
537. 126.046 126.046 ↑ 1.0 1,234 589

Seq Scan on evento_financeiros evento_financeiros_9 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.002..0.214 rows=1,234 loops=589)

538. 2.356 485.336 ↓ 2.2 9 589

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.824..0.824 rows=9 loops=589)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
539. 482.980 482.980 ↓ 2.2 9 589

Seq Scan on precatorio_participantes precatorio_participantes_11 (cost=0.00..213.03 rows=4 width=48) (actual time=0.132..0.820 rows=9 loops=589)

  • Filter: (precatorio_id = tab1_5.precatorios_id)
  • Rows Removed by Filter: 7513
540. 6.784 6.784 ↑ 1.0 1 6,784

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_9 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=6,784)

  • Index Cond: (id = evento_financeiros_9.tipo_evento_financeiro_id)
541. 13.568 13.568 ↑ 1.0 1 6,784

Index Scan using participantes_pkey on participantes participantes_11 (cost=0.28..8.30 rows=1 width=36) (actual time=0.001..0.002 rows=1 loops=6,784)

  • Index Cond: (id = precatorio_participantes_11.participante_id)
542. 6.784 6.784 ↑ 1.0 6 6,784

Seq Scan on tipo_papeis tipo_papeis_8 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=6,784)

543. 58.640 58.640 ↑ 1.0 1 29,320

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_8 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=29,320)

  • Index Cond: (id = rubrica_eventos_8.tipo_rubrica_id)
544. 29.320 29.320 ↑ 1.0 1 29,320

Index Scan using processo_principais_pkey on processo_principais processo_principais_18 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.001 rows=1 loops=29,320)

  • Index Cond: (id = precatorios_18.processo_principal_id)
545. 13.876 58.640 ↓ 2.5 5 29,320

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.001..0.002 rows=5 loops=29,320)

546. 44.764 44.764 ↓ 1.5 3 589

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_8 (cost=0.00..17.91 rows=2 width=12) (actual time=0.037..0.076 rows=3 loops=589)

  • Filter: (precatorio_id = tab1_5.precatorios_id)
  • Rows Removed by Filter: 790
547.          

SubPlan (for Subquery Scan)

548. 0.117 49.803 ↑ 1.0 1 39

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.277..1.277 rows=1 loops=39)

549. 0.390 49.686 ↑ 1.0 3 39

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.270..1.274 rows=3 loops=39)

550. 3.354 49.296 ↓ 3.0 9 39

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.263..1.264 rows=9 loops=39)

  • Sort Key: precatorios_eventos_rubricas_7.precatorios_id, precatorios_eventos_rubricas_7.participantes_nome, precatorios_eventos_rubricas_7.data_evento, precatorios_eventos_rubricas_7.data_evento_id, precatorios_eventos_rubricas_7.numero_processo_principal, precatorios_eventos_rubricas_7.evento_financeiros_id, precatorios_eventos_rubricas_7.tipo_evento_descricao, precatorios_eventos_rubricas_7.tipo_evento_calculavel, precatorios_eventos_rubricas_7.tipo_evento_pagamento, precatorios_eventos_rubricas_7.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_7.tipo_evento_saldo, precatorios_eventos_rubricas_7.participantes_id, precatorios_eventos_rubricas_7.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
551. 0.156 45.942 ↓ 3.0 9 39

Subquery Scan on precatorios_eventos_rubricas_7 (cost=200.00..200.04 rows=3 width=151) (actual time=1.175..1.178 rows=9 loops=39)

552. 4.368 45.786 ↓ 3.0 9 39

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.173..1.174 rows=9 loops=39)

  • Sort Key: precatorios_17.id, participantes_10.nome, tipo_papeis_7.descricao, evento_financeiros_8.data_evento, evento_financeiros_8.id, configuracao_rubrica_precatorios_7.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
553. 1.445 41.418 ↓ 3.0 9 39

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.872..1.062 rows=9 loops=39)

554. 4.134 39.273 ↓ 3.0 9 39

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.856..1.007 rows=9 loops=39)

  • Hash Cond: ((configuracao_rubrica_precatorios_7.precatorio_id = precatorios_17.id) AND (configuracao_rubrica_precatorios_7.tipo_rubrica_id = tipo_rubricas_7.id))
555. 2.184 2.184 ↑ 1.0 793 39

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_7 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.056 rows=793 loops=39)

556. 0.273 32.955 ↓ 3.0 9 39

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.845..0.845 rows=9 loops=39)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
557. 0.158 32.682 ↓ 3.0 9 39

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.166..0.838 rows=9 loops=39)

558. 0.117 31.824 ↓ 3.0 9 39

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.161..0.816 rows=9 loops=39)

559. 0.195 0.858 ↑ 1.0 1 39

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.018..0.022 rows=1 loops=39)

  • Join Filter: (precatorio_participantes_10.tipo_papel_id = tipo_papeis_7.id)
  • Rows Removed by Join Filter: 5
560. 0.078 0.624 ↑ 1.0 1 39

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.014..0.016 rows=1 loops=39)

561. 0.078 0.429 ↑ 1.0 1 39

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.010..0.011 rows=1 loops=39)

562. 0.234 0.234 ↑ 1.0 1 39

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_10 (cost=0.28..8.30 rows=1 width=48) (actual time=0.006..0.006 rows=1 loops=39)

  • Index Cond: (id = tab1_3.precatorio_participantes_id)
563. 0.117 0.117 ↑ 1.0 1 39

Index Scan using precatorios_pkey on precatorios precatorios_17 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=39)

  • Index Cond: (id = precatorio_participantes_10.precatorio_id)
564. 0.117 0.117 ↑ 1.0 1 39

Index Scan using participantes_pkey on participantes participantes_10 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=39)

  • Index Cond: (id = precatorio_participantes_10.participante_id)
565. 0.039 0.039 ↑ 1.0 6 39

Seq Scan on tipo_papeis tipo_papeis_7 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=39)

566. 0.624 30.849 ↓ 3.0 9 39

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.142..0.791 rows=9 loops=39)

  • Join Filter: (evento_financeiros_8.tipo_evento_financeiro_id = tipo_evento_financeiros_8.id)
  • Rows Removed by Join Filter: 39
567. 14.703 30.225 ↓ 2.0 12 39

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.138..0.775 rows=12 loops=39)

  • Hash Cond: (rubrica_eventos_7.evento_financeiro_id = evento_financeiros_8.id)
568. 10.686 10.686 ↑ 1.0 3,944 39

Seq Scan on rubrica_eventos rubrica_eventos_7 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.274 rows=3,944 loops=39)

569. 0.078 4.836 ↓ 2.0 4 39

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.124..0.124 rows=4 loops=39)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
570. 4.758 4.758 ↓ 2.0 4 39

Seq Scan on evento_financeiros evento_financeiros_8 (cost=0.00..33.42 rows=2 width=37) (actual time=0.004..0.122 rows=4 loops=39)

  • Filter: (precatorio_participante_id = tab1_3.precatorio_participantes_id)
  • Rows Removed by Filter: 1230
571. 0.000 0.000 ↑ 1.0 4 464

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=464)

572. 0.003 0.003 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_8 (cost=0.00..1.09 rows=4 width=31) (actual time=0.002..0.003 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
573. 0.700 0.700 ↑ 1.0 1 350

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_7 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=350)

  • Index Cond: (id = rubrica_eventos_7.tipo_rubrica_id)
574. 0.700 0.700 ↑ 1.0 1 350

Index Scan using processo_principais_pkey on processo_principais processo_principais_17 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=350)

  • Index Cond: (id = precatorios_17.processo_principal_id)
575. 224.554 10,188.662 ↑ 1.0 1 1,903

Aggregate (cost=793,553.86..793,553.88 rows=1 width=8) (actual time=5.354..5.354 rows=1 loops=1,903)

576. 272.112 6,038.219 ↓ 8.8 35 1,903

Nested Loop Left Join (cost=792,522.27..792,736.87 rows=4 width=8) (actual time=2.507..3.173 rows=35 loops=1,903)

  • Join Filter: (prec_part2.precatorio_id = ult_ev_credor_quitado.precatorios_id)
  • Rows Removed by Join Filter: 2266
577. 9.119 4,121.898 ↑ 1.0 4 1,903

Nested Loop Left Join (cost=816.94..1,030.05 rows=4 width=20) (actual time=1.677..2.166 rows=4 loops=1,903)

  • Join Filter: (prec_part2.precatorio_id = ult_ev_credor_quitado.precatorios_id)
578. 1,543.333 1,543.333 ↑ 1.0 4 1,903

Seq Scan on precatorio_participantes prec_part2 (cost=0.00..213.03 rows=4 width=8) (actual time=0.323..0.811 rows=4 loops=1,903)

  • Filter: (precatorio_id = precatorios_6.id)
  • Rows Removed by Filter: 7518
579. 5.464 2,569.446 ↓ 0.0 0 7,513

Materialize (cost=816.94..816.96 rows=1 width=12) (actual time=0.342..0.342 rows=0 loops=7,513)

580. 1.877 2,563.982 ↓ 0.0 0 1,877

Subquery Scan on ult_ev_credor_quitado (cost=816.94..816.96 rows=1 width=12) (actual time=1.366..1.366 rows=0 loops=1,877)

581. 9.385 2,562.105 ↓ 0.0 0 1,877

Sort (cost=816.94..816.95 rows=1 width=151) (actual time=1.365..1.365 rows=0 loops=1,877)

  • Sort Key: tab1_7.numero_processo_principal, tab1_7.participantes_nome
  • Sort Method: quicksort Memory: 25kB
582. 1.462 2,552.720 ↓ 0.0 0 1,877

Subquery Scan on tab1_7 (cost=416.30..816.93 rows=1 width=151) (actual time=1.356..1.360 rows=0 loops=1,877)

  • Filter: (tab1_7.data_evento_id = (SubPlan 15))
  • Rows Removed by Filter: 0
583. 5.631 2,535.827 ↓ 0.0 0 1,877

GroupAggregate (cost=416.30..416.40 rows=2 width=151) (actual time=1.351..1.351 rows=0 loops=1,877)

  • Filter: CASE WHEN (sum(precatorios_eventos_rubricas_16.valor_com_sinal) <= 0::double precision) THEN true ELSE false END
  • Rows Removed by Filter: 1
584. 45.048 2,530.196 ↑ 1.0 2 1,877

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=1.348..1.348 rows=2 loops=1,877)

  • Sort Key: precatorios_eventos_rubricas_16.precatorios_id, precatorios_eventos_rubricas_16.participantes_nome, precatorios_eventos_rubricas_16.data_evento, precatorios_eventos_rubricas_16.data_evento_id, precatorios_eventos_rubricas_16.numero_processo_principal, precatorios_eventos_rubricas_16.evento_financeiros_id, precatorios_eventos_rubricas_16.tipo_evento_descricao, precatorios_eventos_rubricas_16.tipo_evento_calculavel, precatorios_eventos_rubricas_16.tipo_evento_pagamento, precatorios_eventos_rubricas_16.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_16.tipo_evento_saldo, precatorios_eventos_rubricas_16.participantes_id, precatorios_eventos_rubricas_16.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
585. 3.754 2,485.148 ↑ 1.0 2 1,877

Subquery Scan on precatorios_eventos_rubricas_16 (cost=416.26..416.29 rows=2 width=151) (actual time=1.323..1.324 rows=2 loops=1,877)

586. 48.802 2,481.394 ↑ 1.0 2 1,877

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=1.322..1.322 rows=2 loops=1,877)

  • Sort Key: participantes_20.nome, tipo_papeis_16.descricao, evento_financeiros_17.data_evento, evento_financeiros_17.id, configuracao_rubrica_precatorios_16.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
587. 16.749 2,432.592 ↑ 1.0 2 1,877

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.218..1.296 rows=2 loops=1,877)

  • Join Filter: ((precatorios_27.id = configuracao_rubrica_precatorios_16.precatorio_id) AND (tipo_rubricas_16.id = configuracao_rubrica_precatorios_16.tipo_rubrica_id))
  • Rows Removed by Join Filter: 7
588. 3.718 2,385.667 ↑ 1.0 2 1,877

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.205..1.271 rows=2 loops=1,877)

589. 5.631 2,374.405 ↑ 1.0 2 1,877

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.203..1.265 rows=2 loops=1,877)

590. 11.262 11.262 ↑ 1.0 1 1,877

Index Scan using precatorios_pkey on precatorios precatorios_27 (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=1,877)

  • Index Cond: (id = precatorios_6.id)
591. 7.472 2,357.512 ↑ 1.0 2 1,877

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.195..1.256 rows=2 loops=1,877)

592. 140.112 2,342.496 ↑ 1.0 2 1,877

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.190..1.248 rows=2 loops=1,877)

  • Hash Cond: (rubrica_eventos_16.evento_financeiro_id = evento_financeiros_17.id)
593. 96.390 96.390 ↑ 1.0 3,933 357

Seq Scan on rubrica_eventos rubrica_eventos_16 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.270 rows=3,933 loops=357)

594. 3.754 2,105.994 ↑ 1.0 1 1,877

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.122..1.122 rows=1 loops=1,877)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
595. 4.425 2,102.240 ↑ 1.0 1 1,877

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=1.090..1.120 rows=1 loops=1,877)

  • Join Filter: (precatorio_participantes_21.tipo_papel_id = tipo_papeis_16.id)
  • Rows Removed by Join Filter: 3
596. 2.013 2,096.609 ↑ 1.0 1 1,877

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=1.088..1.117 rows=1 loops=1,877)

597. 6.973 2,090.978 ↑ 1.0 1 1,877

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=1.086..1.114 rows=1 loops=1,877)

598. 174.561 2,081.593 ↑ 1.0 1 1,877

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=1.082..1.109 rows=1 loops=1,877)

  • Hash Cond: (evento_financeiros_17.precatorio_participante_id = precatorio_participantes_21.id)
599. 392.293 392.293 ↑ 1.0 1,234 1,877

Seq Scan on evento_financeiros evento_financeiros_17 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.001..0.209 rows=1,234 loops=1,877)

600. 5.631 1,514.739 ↑ 1.0 4 1,877

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.807..0.807 rows=4 loops=1,877)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
601. 1,509.108 1,509.108 ↑ 1.0 4 1,877

Seq Scan on precatorio_participantes precatorio_participantes_21 (cost=0.00..213.03 rows=4 width=48) (actual time=0.312..0.804 rows=4 loops=1,877)

  • Filter: (precatorio_id = precatorios_6.id)
  • Rows Removed by Filter: 7518
602. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_17 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = evento_financeiros_17.tipo_evento_financeiro_id)
603. 3.618 3.618 ↑ 1.0 1 1,206

Index Scan using participantes_pkey on participantes participantes_20 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_21.participante_id)
604. 1.206 1.206 ↑ 1.0 6 1,206

Seq Scan on tipo_papeis tipo_papeis_16 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=1,206)

605. 7.544 7.544 ↑ 1.0 1 3,772

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_16 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.002 rows=1 loops=3,772)

  • Index Cond: (id = rubrica_eventos_16.tipo_rubrica_id)
606. 7.544 7.544 ↑ 1.0 1 3,772

Index Scan using processo_principais_pkey on processo_principais processo_principais_27 (cost=0.28..8.30 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=3,772)

  • Index Cond: (id = precatorios_27.processo_principal_id)
607. 2.764 30.176 ↓ 2.0 4 3,772

Materialize (cost=0.00..17.92 rows=2 width=12) (actual time=0.004..0.008 rows=4 loops=3,772)

608. 27.412 27.412 ↑ 1.0 2 356

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_16 (cost=0.00..17.91 rows=2 width=12) (actual time=0.042..0.077 rows=2 loops=356)

  • Filter: (precatorio_id = precatorios_6.id)
  • Rows Removed by Filter: 791
609.          

SubPlan (for Subquery Scan)

610. 0.065 15.431 ↑ 1.0 1 13

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.186..1.187 rows=1 loops=13)

611. 0.130 15.366 ↑ 1.0 3 13

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.178..1.182 rows=3 loops=13)

612. 1.027 15.236 ↓ 3.0 9 13

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.172..1.172 rows=9 loops=13)

  • Sort Key: precatorios_eventos_rubricas_14.precatorios_id, precatorios_eventos_rubricas_14.participantes_nome, precatorios_eventos_rubricas_14.data_evento, precatorios_eventos_rubricas_14.data_evento_id, precatorios_eventos_rubricas_14.numero_processo_principal, precatorios_eventos_rubricas_14.evento_financeiros_id, precatorios_eventos_rubricas_14.tipo_evento_descricao, precatorios_eventos_rubricas_14.tipo_evento_calculavel, precatorios_eventos_rubricas_14.tipo_evento_pagamento, precatorios_eventos_rubricas_14.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_14.tipo_evento_saldo, precatorios_eventos_rubricas_14.participantes_id, precatorios_eventos_rubricas_14.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
613. 0.052 14.209 ↓ 3.0 9 13

Subquery Scan on precatorios_eventos_rubricas_14 (cost=200.00..200.04 rows=3 width=151) (actual time=1.090..1.093 rows=9 loops=13)

614. 1.326 14.157 ↓ 3.0 9 13

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.088..1.089 rows=9 loops=13)

  • Sort Key: precatorios_25.id, participantes_18.nome, tipo_papeis_14.descricao, evento_financeiros_15.data_evento, evento_financeiros_15.id, configuracao_rubrica_precatorios_14.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
615. 0.400 12.831 ↓ 3.0 9 13

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.826..0.987 rows=9 loops=13)

616. 1.235 12.207 ↓ 3.0 9 13

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.809..0.939 rows=9 loops=13)

  • Hash Cond: ((configuracao_rubrica_precatorios_14.precatorio_id = precatorios_25.id) AND (configuracao_rubrica_precatorios_14.tipo_rubrica_id = tipo_rubricas_14.id))
617. 0.689 0.689 ↑ 1.0 793 13

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_14 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.053 rows=793 loops=13)

618. 0.091 10.283 ↓ 3.0 9 13

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.791..0.791 rows=9 loops=13)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
619. 0.122 10.192 ↓ 3.0 9 13

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.167..0.784 rows=9 loops=13)

620. 0.065 9.958 ↓ 3.0 9 13

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.161..0.766 rows=9 loops=13)

621. 0.052 0.286 ↑ 1.0 1 13

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.019..0.022 rows=1 loops=13)

  • Join Filter: (precatorio_participantes_19.tipo_papel_id = tipo_papeis_14.id)
  • Rows Removed by Join Filter: 5
622. 0.026 0.221 ↑ 1.0 1 13

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.015..0.017 rows=1 loops=13)

623. 0.039 0.156 ↑ 1.0 1 13

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.011..0.012 rows=1 loops=13)

624. 0.078 0.078 ↑ 1.0 1 13

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_19 (cost=0.28..8.30 rows=1 width=48) (actual time=0.006..0.006 rows=1 loops=13)

  • Index Cond: (id = tab1_7.precatorio_participantes_id)
625. 0.039 0.039 ↑ 1.0 1 13

Index Scan using precatorios_pkey on precatorios precatorios_25 (cost=0.28..8.30 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=13)

  • Index Cond: (id = precatorio_participantes_19.precatorio_id)
626. 0.039 0.039 ↑ 1.0 1 13

Index Scan using participantes_pkey on participantes participantes_18 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=13)

  • Index Cond: (id = precatorio_participantes_19.participante_id)
627. 0.013 0.013 ↑ 1.0 6 13

Seq Scan on tipo_papeis tipo_papeis_14 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=13)

628. 0.195 9.607 ↓ 3.0 9 13

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.141..0.739 rows=9 loops=13)

  • Join Filter: (evento_financeiros_15.tipo_evento_financeiro_id = tipo_evento_financeiros_15.id)
  • Rows Removed by Join Filter: 37
629. 4.667 9.412 ↓ 1.8 11 13

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.136..0.724 rows=11 loops=13)

  • Hash Cond: (rubrica_eventos_14.evento_financeiro_id = evento_financeiros_15.id)
630. 3.237 3.237 ↑ 1.0 3,944 13

Seq Scan on rubrica_eventos rubrica_eventos_14 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.249 rows=3,944 loops=13)

631. 0.026 1.508 ↓ 2.0 4 13

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.116..0.116 rows=4 loops=13)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
632. 1.482 1.482 ↓ 2.0 4 13

Seq Scan on evento_financeiros evento_financeiros_15 (cost=0.00..33.42 rows=2 width=37) (actual time=0.005..0.114 rows=4 loops=13)

  • Filter: (precatorio_participante_id = tab1_7.precatorio_participantes_id)
  • Rows Removed by Filter: 1230
633. 0.000 0.000 ↑ 1.0 4 148

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=148)

634. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_15 (cost=0.00..1.09 rows=4 width=31) (actual time=0.003..0.004 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
635. 0.112 0.112 ↑ 1.0 1 112

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_14 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=112)

  • Index Cond: (id = rubrica_eventos_14.tipo_rubrica_id)
636. 0.224 0.224 ↑ 1.0 1 112

Index Scan using processo_principais_pkey on processo_principais processo_principais_25 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=112)

  • Index Cond: (id = precatorios_25.processo_principal_id)
637. 183.186 1,644.209 ↓ 28.9 577 7,577

Materialize (cost=791,705.33..791,705.68 rows=20 width=4) (actual time=0.193..0.217 rows=577 loops=7,577)

638. 0.094 1,461.023 ↓ 28.9 577 1

Subquery Scan on ult_ev_credor_em_pagto (cost=791,705.33..791,705.58 rows=20 width=4) (actual time=1,460.897..1,461.023 rows=577 loops=1)

639. 3.525 1,460.929 ↓ 28.9 577 1

Sort (cost=791,705.33..791,705.38 rows=20 width=151) (actual time=1,460.896..1,460.929 rows=577 loops=1)

  • Sort Key: tab1_8.numero_processo_principal, tab1_8.participantes_nome
  • Sort Method: quicksort Memory: 178kB
640. 3.313 1,457.404 ↓ 28.9 577 1

Subquery Scan on tab1_8 (cost=1,659.01..791,704.90 rows=20 width=151) (actual time=128.669..1,457.404 rows=577 loops=1)

  • Filter: (tab1_8.data_evento_id = (SubPlan 16))
  • Rows Removed by Filter: 637
641. 3.374 115.049 ↑ 3.2 1,214 1

GroupAggregate (cost=1,659.01..1,866.07 rows=3,944 width=151) (actual time=111.272..115.049 rows=1,214 loops=1)

  • Filter: (NOT CASE WHEN (sum(precatorios_eventos_rubricas_17.valor_com_sinal) <= 0::double precision) THEN true ELSE false END)
  • Rows Removed by Filter: 20
642. 29.644 111.675 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=111.244..111.675 rows=3,944 loops=1)

  • Sort Key: precatorios_eventos_rubricas_17.precatorios_id, precatorios_eventos_rubricas_17.participantes_nome, precatorios_eventos_rubricas_17.data_evento, precatorios_eventos_rubricas_17.data_evento_id, precatorios_eventos_rubricas_17.numero_processo_principal, precatorios_eventos_rubricas_17.evento_financeiros_id, precatorios_eventos_rubricas_17.tipo_evento_descricao, precatorios_eventos_rubricas_17.tipo_evento_calculavel, precatorios_eventos_rubricas_17.tipo_evento_pagamento, precatorios_eventos_rubricas_17.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_17.tipo_evento_saldo, precatorios_eventos_rubricas_17.participantes_id, precatorios_eventos_rubricas_17.precatorio_participantes_id
  • Sort Method: quicksort Memory: 1144kB
643. 1.431 82.031 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_17 (cost=1,374.15..1,423.45 rows=3,944 width=151) (actual time=80.229..82.031 rows=3,944 loops=1)

644. 59.330 80.600 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=80.224..80.600 rows=3,944 loops=1)

  • Sort Key: precatorios_28.id, participantes_21.nome, tipo_papeis_17.descricao, evento_financeiros_18.data_evento, evento_financeiros_18.id, configuracao_rubrica_precatorios_17.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
645. 6.979 21.270 ↑ 1.0 3,944 1

Hash Join (cost=972.25..1,138.58 rows=3,944 width=212) (actual time=12.153..21.270 rows=3,944 loops=1)

  • Hash Cond: (precatorios_28.processo_principal_id = processo_principais_28.id)
646. 2.083 13.632 ↑ 1.0 3,944 1

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=11.474..13.632 rows=3,944 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios_17.precatorio_id = precatorios_28.id) AND (configuracao_rubrica_precatorios_17.tipo_rubrica_id = tipo_rubricas_17.id))
647. 0.089 0.089 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_17 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.089 rows=793 loops=1)

648. 2.034 11.460 ↑ 1.0 3,944 1

Hash (cost=834.67..834.67 rows=3,944 width=191) (actual time=11.460..11.460 rows=3,944 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
649. 1.189 9.426 ↑ 1.0 3,944 1

Hash Join (cost=625.77..834.67 rows=3,944 width=191) (actual time=6.187..9.426 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_17.tipo_rubrica_id = tipo_rubricas_17.id)
650. 1.756 8.224 ↑ 1.0 3,944 1

Hash Join (cost=623.98..778.65 rows=3,944 width=168) (actual time=6.168..8.224 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_17.evento_financeiro_id = evento_financeiros_18.id)
651. 0.310 0.310 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_17 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.310 rows=3,944 loops=1)

652. 0.552 6.158 ↑ 1.0 1,234 1

Hash (cost=608.56..608.56 rows=1,234 width=144) (actual time=6.158..6.158 rows=1,234 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
653. 0.463 5.606 ↑ 1.0 1,234 1

Hash Join (cost=263.68..608.56 rows=1,234 width=144) (actual time=2.110..5.606 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_22.tipo_papel_id = tipo_papeis_17.id)
654. 0.413 5.139 ↑ 1.0 1,234 1

Hash Join (cost=262.55..590.45 rows=1,234 width=136) (actual time=2.100..5.139 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_22.participante_id = participantes_21.id)
655. 0.320 3.788 ↑ 1.0 1,234 1

Hash Join (cost=132.88..440.73 rows=1,234 width=108) (actual time=1.152..3.788 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_22.precatorio_id = precatorios_28.id)
656. 0.378 2.824 ↑ 1.0 1,234 1

Hash Join (cost=46.97..336.31 rows=1,234 width=100) (actual time=0.499..2.824 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros_18.tipo_evento_financeiro_id = tipo_evento_financeiros_18.id)
657. 0.915 2.438 ↑ 1.0 1,234 1

Hash Join (cost=45.77..318.14 rows=1,234 width=77) (actual time=0.483..2.438 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_22.id = evento_financeiros_18.precatorio_participante_id)
658. 1.063 1.063 ↑ 1.0 7,522 1

Seq Scan on precatorio_participantes precatorio_participantes_22 (cost=0.00..194.22 rows=7,522 width=48) (actual time=0.002..1.063 rows=7,522 loops=1)

659. 0.217 0.460 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=37) (actual time=0.460..0.460 rows=1,234 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
660. 0.243 0.243 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_18 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.002..0.243 rows=1,234 loops=1)

661. 0.004 0.008 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=31) (actual time=0.008..0.008 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
662. 0.004 0.004 ↑ 1.0 9 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_18 (cost=0.00..1.09 rows=9 width=31) (actual time=0.001..0.004 rows=9 loops=1)

663. 0.266 0.644 ↑ 1.0 1,907 1

Hash (cost=62.07..62.07 rows=1,907 width=16) (actual time=0.644..0.644 rows=1,907 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
664. 0.378 0.378 ↑ 1.0 1,907 1

Seq Scan on precatorios precatorios_28 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.002..0.378 rows=1,907 loops=1)

665. 0.460 0.938 ↑ 1.0 3,141 1

Hash (cost=90.41..90.41 rows=3,141 width=36) (actual time=0.938..0.938 rows=3,141 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
666. 0.478 0.478 ↑ 1.0 3,141 1

Seq Scan on participantes participantes_21 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.003..0.478 rows=3,141 loops=1)

667. 0.002 0.004 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=16) (actual time=0.004..0.004 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
668. 0.002 0.002 ↑ 1.0 6 1

Seq Scan on tipo_papeis tipo_papeis_17 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.002 rows=6 loops=1)

669. 0.005 0.013 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=31) (actual time=0.013..0.013 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
670. 0.008 0.008 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_17 (cost=0.00..1.35 rows=35 width=31) (actual time=0.002..0.008 rows=35 loops=1)

671. 0.302 0.659 ↑ 1.0 2,063 1

Hash (cost=52.63..52.63 rows=2,063 width=33) (actual time=0.659..0.659 rows=2,063 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 145kB
672. 0.357 0.357 ↑ 1.0 2,063 1

Seq Scan on processo_principais processo_principais_28 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.002..0.357 rows=2,063 loops=1)

673.          

SubPlan (for Subquery Scan)

674. 2.428 1,339.042 ↑ 1.0 1 1,214

Aggregate (cost=200.24..200.25 rows=1 width=32) (actual time=1.103..1.103 rows=1 loops=1,214)

675. 7.284 1,336.614 ↑ 1.5 2 1,214

GroupAggregate (cost=200.06..200.20 rows=3 width=151) (actual time=1.099..1.101 rows=2 loops=1,214)

676. 74.054 1,329.330 ↓ 2.3 7 1,214

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.095..1.095 rows=7 loops=1,214)

  • Sort Key: precatorios_eventos_rubricas_15.precatorios_id, precatorios_eventos_rubricas_15.participantes_nome, precatorios_eventos_rubricas_15.data_evento, precatorios_eventos_rubricas_15.data_evento_id, precatorios_eventos_rubricas_15.numero_processo_principal, precatorios_eventos_rubricas_15.evento_financeiros_id, precatorios_eventos_rubricas_15.tipo_evento_descricao, precatorios_eventos_rubricas_15.tipo_evento_calculavel, precatorios_eventos_rubricas_15.tipo_evento_pagamento, precatorios_eventos_rubricas_15.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_15.tipo_evento_saldo, precatorios_eventos_rubricas_15.participantes_id, precatorios_eventos_rubricas_15.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
677. 3.642 1,255.276 ↓ 2.3 7 1,214

Subquery Scan on precatorios_eventos_rubricas_15 (cost=200.00..200.04 rows=3 width=151) (actual time=1.032..1.034 rows=7 loops=1,214)

678. 82.552 1,251.634 ↓ 2.3 7 1,214

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.031..1.031 rows=7 loops=1,214)

  • Sort Key: precatorios_26.id, participantes_19.nome, tipo_papeis_15.descricao, evento_financeiros_16.data_evento, evento_financeiros_16.id, configuracao_rubrica_precatorios_15.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
679. 31.372 1,169.082 ↓ 2.3 7 1,214

Nested Loop (cost=177.13..199.98 rows=3 width=212) (actual time=0.858..0.963 rows=7 loops=1,214)

680. 116.544 1,121.736 ↓ 2.3 7 1,214

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.844..0.924 rows=7 loops=1,214)

  • Hash Cond: ((configuracao_rubrica_precatorios_15.precatorio_id = precatorios_26.id) AND (configuracao_rubrica_precatorios_15.tipo_rubrica_id = tipo_rubricas_15.id))
681. 63.128 63.128 ↑ 1.0 793 1,214

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_15 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.052 rows=793 loops=1,214)

682. 6.070 942.064 ↓ 2.3 7 1,214

Hash (cost=176.80..176.80 rows=3 width=191) (actual time=0.776..0.776 rows=7 loops=1,214)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
683. 10.223 935.994 ↓ 2.3 7 1,214

Nested Loop (cost=34.43..176.80 rows=3 width=191) (actual time=0.456..0.771 rows=7 loops=1,214)

684. 1.214 917.784 ↓ 2.3 7 1,214

Nested Loop (cost=34.29..176.28 rows=3 width=168) (actual time=0.452..0.756 rows=7 loops=1,214)

685. 4.856 21.852 ↑ 1.0 1 1,214

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.015..0.018 rows=1 loops=1,214)

  • Join Filter: (precatorio_participantes_20.tipo_papel_id = tipo_papeis_15.id)
  • Rows Removed by Join Filter: 5
686. 0.000 15.782 ↑ 1.0 1 1,214

Nested Loop (cost=0.84..24.92 rows=1 width=84) (actual time=0.012..0.013 rows=1 loops=1,214)

687. 2.428 12.140 ↑ 1.0 1 1,214

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.009..0.010 rows=1 loops=1,214)

688. 6.070 6.070 ↑ 1.0 1 1,214

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_20 (cost=0.28..8.30 rows=1 width=48) (actual time=0.005..0.005 rows=1 loops=1,214)

  • Index Cond: (id = tab1_8.precatorio_participantes_id)
689. 3.642 3.642 ↑ 1.0 1 1,214

Index Scan using precatorios_pkey on precatorios precatorios_26 (cost=0.28..8.30 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=1,214)

  • Index Cond: (id = precatorio_participantes_20.precatorio_id)
690. 3.642 3.642 ↑ 1.0 1 1,214

Index Scan using participantes_pkey on participantes participantes_19 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1,214)

  • Index Cond: (id = precatorio_participantes_20.participante_id)
691. 1.214 1.214 ↑ 1.0 6 1,214

Seq Scan on tipo_papeis tipo_papeis_15 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=1,214)

692. 12.140 894.718 ↓ 2.3 7 1,214

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.436..0.737 rows=7 loops=1,214)

  • Join Filter: (evento_financeiros_16.tipo_evento_financeiro_id = tipo_evento_financeiros_16.id)
  • Rows Removed by Join Filter: 21
693. 433.398 882.578 ↓ 1.2 7 1,214

Hash Join (cost=33.45..148.74 rows=6 width=61) (actual time=0.433..0.727 rows=7 loops=1,214)

  • Hash Cond: (rubrica_eventos_15.evento_financeiro_id = evento_financeiros_16.id)
694. 308.356 308.356 ↑ 1.0 3,944 1,214

Seq Scan on rubrica_eventos rubrica_eventos_15 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.254 rows=3,944 loops=1,214)

695. 3.642 140.824 ↑ 1.0 2 1,214

Hash (cost=33.42..33.42 rows=2 width=37) (actual time=0.116..0.116 rows=2 loops=1,214)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
696. 137.182 137.182 ↑ 1.0 2 1,214

Seq Scan on evento_financeiros evento_financeiros_16 (cost=0.00..33.42 rows=2 width=37) (actual time=0.058..0.113 rows=2 loops=1,214)

  • Filter: (precatorio_participante_id = tab1_8.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
697. 0.000 0.000 ↑ 1.0 4 8,228

Materialize (cost=0.00..1.11 rows=4 width=31) (actual time=0.000..0.000 rows=4 loops=8,228)

698. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_16 (cost=0.00..1.09 rows=4 width=31) (actual time=0.003..0.006 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
699. 7.987 7.987 ↑ 1.0 1 7,987

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_15 (cost=0.14..0.16 rows=1 width=31) (actual time=0.001..0.001 rows=1 loops=7,987)

  • Index Cond: (id = rubrica_eventos_15.tipo_rubrica_id)
700. 15.974 15.974 ↑ 1.0 1 7,987

Index Scan using processo_principais_pkey on processo_principais processo_principais_26 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=7,987)

  • Index Cond: (id = precatorios_26.processo_principal_id)
701.          

SubPlan (for Aggregate)

702. 15.224 3,925.889 ↑ 1.0 1 1,903

Aggregate (cost=816.96..816.97 rows=1 width=4) (actual time=2.063..2.063 rows=1 loops=1,903)

703. 9.515 3,910.665 ↓ 0.0 0 1,903

Sort (cost=816.94..816.95 rows=1 width=151) (actual time=2.055..2.055 rows=0 loops=1,903)

  • Sort Key: tab1_6.numero_processo_principal, tab1_6.participantes_nome
  • Sort Method: quicksort Memory: 25kB
704. 6.479 3,901.150 ↓ 0.0 0 1,903

Subquery Scan on tab1_6 (cost=416.30..816.93 rows=1 width=151) (actual time=1.768..2.050 rows=0 loops=1,903)

  • Filter: (tab1_6.data_evento_id = (SubPlan 13))
  • Rows Removed by Filter: 0
705. 5.709 2,582.371 ↑ 2.0 1 1,903

GroupAggregate (cost=416.30..416.40 rows=2 width=151) (actual time=1.356..1.357 rows=1 loops=1,903)

  • Filter: (NOT CASE WHEN (sum(precatorios_eventos_rubricas_13.valor_com_sinal) <= 0::double precision) THEN true ELSE false END)
  • Rows Removed by Filter: 0
706. 45.672 2,576.662 ↑ 1.0 2 1,903

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=1.354..1.354 rows=2 loops=1,903)

  • Sort Key: precatorios_eventos_rubricas_13.precatorios_id, precatorios_eventos_rubricas_13.participantes_nome, precatorios_eventos_rubricas_13.data_evento, precatorios_eventos_rubricas_13.data_evento_id, precatorios_eventos_rubricas_13.numero_processo_principal, precatorios_eventos_rubricas_13.evento_financeiros_id, precatorios_eventos_rubricas_13.tipo_evento_descricao, precatorios_eventos_rubricas_13.tipo_evento_calculavel, precatorios_eventos_rubricas_13.tipo_evento_pagamento, precatorios_eventos_rubricas_13.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_13.tipo_evento_saldo, precatorios_eventos_rubricas_13.participantes_id, precatorios_eventos_rubricas_13.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
707. 3.806 2,530.990 ↑ 1.0 2 1,903

Subquery Scan on precatorios_eventos_rubricas_13 (cost=416.26..416.29 rows=2 width=151) (actual time=1.329..1.330 rows=2 loops=1,903)

708. 49.478 2,527.184 ↑ 1.0 2 1,903

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=1.328..1.328 rows=2 loops=1,903)

  • Sort Key: participantes_17.nome, tipo_papeis_13.descricao, evento_financeiros_14.data_evento, evento_financeiros_14.id, configuracao_rubrica_precatorios_13.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
709. 15.496 2,477.706 ↑ 1.0 2 1,903

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.227..1.302 rows=2 loops=1,903)

  • Join Filter: ((precatorios_24.id = configuracao_rubrica_precatorios_13.precatorio_id) AND (tipo_rubricas_13.id = configuracao_rubrica_precatorios_13.tipo_rubrica_id))
  • Rows Removed by Join Filter: 7
710. 1.971 2,432.034 ↑ 1.0 2 1,903

Nested Loop (cost=258.38..398.23 rows=2 width=208) (actual time=1.216..1.278 rows=2 loops=1,903)

711. 5.709 2,422.519 ↑ 1.0 2 1,903

Nested Loop (cost=258.10..381.61 rows=2 width=191) (actual time=1.214..1.273 rows=2 loops=1,903)

712. 11.418 11.418 ↑ 1.0 1 1,903

Index Scan using precatorios_pkey on precatorios precatorios_24 (cost=0.28..8.29 rows=1 width=16) (actual time=0.005..0.006 rows=1 loops=1,903)

  • Index Cond: (id = precatorios_6.id)
713. 9.583 2,405.392 ↑ 1.0 2 1,903

Nested Loop (cost=257.82..373.29 rows=2 width=183) (actual time=1.206..1.264 rows=2 loops=1,903)

714. 136.968 2,388.265 ↑ 1.0 2 1,903

Hash Join (cost=257.68..372.94 rows=2 width=160) (actual time=1.201..1.255 rows=2 loops=1,903)

  • Hash Cond: (rubrica_eventos_13.evento_financeiro_id = evento_financeiros_14.id)
715. 91.392 91.392 ↑ 1.0 3,933 357

Seq Scan on rubrica_eventos rubrica_eventos_13 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.001..0.256 rows=3,933 loops=357)

716. 3.806 2,159.905 ↑ 1.0 1 1,903

Hash (cost=257.67..257.67 rows=1 width=136) (actual time=1.135..1.135 rows=1 loops=1,903)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
717. 4.503 2,156.099 ↑ 1.0 1 1,903

Nested Loop (cost=213.49..257.67 rows=1 width=136) (actual time=1.103..1.133 rows=1 loops=1,903)

  • Join Filter: (precatorio_participantes_18.tipo_papel_id = tipo_papeis_13.id)
  • Rows Removed by Join Filter: 3
718. 3.297 2,150.390 ↑ 1.0 1 1,903

Nested Loop (cost=213.49..256.54 rows=1 width=128) (actual time=1.101..1.130 rows=1 loops=1,903)

719. 5.200 2,144.681 ↑ 1.0 1 1,903

Nested Loop (cost=213.21..248.23 rows=1 width=100) (actual time=1.100..1.127 rows=1 loops=1,903)

720. 172.924 2,137.069 ↑ 1.0 1 1,903

Hash Join (cost=213.08..248.05 rows=1 width=77) (actual time=1.096..1.123 rows=1 loops=1,903)

  • Hash Cond: (evento_financeiros_14.precatorio_participante_id = precatorio_participantes_18.id)
721. 394.170 394.170 ↑ 1.0 1,234 1,877

Seq Scan on evento_financeiros evento_financeiros_14 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.001..0.210 rows=1,234 loops=1,877)

722. 5.709 1,569.975 ↑ 1.0 4 1,903

Hash (cost=213.03..213.03 rows=4 width=48) (actual time=0.825..0.825 rows=4 loops=1,903)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
723. 1,564.266 1,564.266 ↑ 1.0 4 1,903

Seq Scan on precatorio_participantes precatorio_participantes_18 (cost=0.00..213.03 rows=4 width=48) (actual time=0.329..0.822 rows=4 loops=1,903)

  • Filter: (precatorio_id = precatorios_6.id)
  • Rows Removed by Filter: 7518
724. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_14 (cost=0.14..0.16 rows=1 width=31) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = evento_financeiros_14.tipo_evento_financeiro_id)
725. 2.412 2.412 ↑ 1.0 1 1,206

Index Scan using participantes_pkey on participantes participantes_17 (cost=0.28..8.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=1,206)

  • Index Cond: (id = precatorio_participantes_18.participante_id)
726. 1.206 1.206 ↑ 1.0 6 1,206

Seq Scan on tipo_papeis tipo_papeis_13 (cost=0.00..1.06 rows=6 width=16) (actual time=0.000..0.001 rows=6 loops=1,206)

727. 7.544 7.544 ↑ 1.0 1 3,772