explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OEhC

Settings
# exclusive inclusive rows x rows loops node
1. 1.566 9,285.659 ↑ 15.5 1,494 1

Sort (cost=4,871,115.71..4,871,173.78 rows=23,229 width=1,241) (actual time=9,285.583..9,285.659 rows=1,494 loops=1)

  • Sort Key: precatorios.revisao_pendente
  • Sort Method: quicksort Memory: 1774kB
2. 7.178 9,284.093 ↑ 15.5 1,494 1

Sort (cost=4,869,140.82..4,869,198.89 rows=23,229 width=1,172) (actual time=9,283.842..9,284.093 rows=1,494 loops=1)

  • Sort Key: proc_prin.numero_processo, precatorios.id
  • Sort Method: quicksort Memory: 1774kB
3. 2.431 9,276.915 ↑ 15.5 1,494 1

Hash Left Join (cost=3,989,574.38..4,867,456.29 rows=23,229 width=1,172) (actual time=8,403.051..9,276.915 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = precatorios_atrasados_nao_quitados.precatorio_id)
4. 1.254 6,043.246 ↑ 15.5 1,494 1

Hash Join (cost=2,398,919.30..3,274,393.04 rows=23,229 width=1,164) (actual time=5,171.785..6,043.246 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = percentual_cadastro_quitacao_precatorio.precatorio_id)
5. 0.903 2,995.466 ↑ 15.5 1,494 1

Hash Left Join (cost=803,482.51..1,673,119.96 rows=23,229 width=1,155) (actual time=2,125.242..2,995.466 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = precatorios_1.id)
6. 2.037 2,981.371 ↑ 15.5 1,494 1

Hash Right Join (cost=803,289.47..1,672,818.86 rows=23,229 width=1,147) (actual time=2,112.040..2,981.371 rows=1,494 loops=1)

  • Hash Cond: (ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id = precatorios.id)
7. 10.675 2,443.665 ↑ 3.0 360 1

GroupAggregate (cost=793,058.70..1,662,429.23 rows=1,064 width=65) (actual time=1,576.350..2,443.665 rows=360 loops=1)

8. 19.623 1,574.390 ↓ 4.7 5,052 1

Sort (cost=793,058.70..793,061.36 rows=1,064 width=65) (actual time=1,573.857..1,574.390 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_1.credor))
  • Sort Method: quicksort Memory: 903kB
9. 0.836 1,554.767 ↓ 4.7 5,052 1

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

  • Hash Cond: (precatorio_participantes.orcamentario_id = orcamentarios.id)
10. 1.158 1,553.930 ↓ 4.7 5,052 1

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

  • Hash Cond: (precatorio_participantes.rpv_id = rpvs.id)
11. 1.042 1,552.019 ↓ 4.7 5,052 1

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

  • Hash Cond: (precatorios_2.id = precatorio_participantes.precatorio_id)
12. 0.406 1,548.868 ↓ 2.2 596 1

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

  • Hash Cond: (precatorios_2.id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
13. 1.197 16.215 ↑ 1.8 1,472 1

GroupAggregate (cost=750.79..817.16 rows=2,655 width=62) (actual time=14.764..16.215 rows=1,472 loops=1)

14. 9.166 15.018 ↓ 1.0 2,656 1

Sort (cost=750.79..757.43 rows=2,655 width=62) (actual time=14.749..15.018 rows=2,656 loops=1)

  • Sort Key: processo_principais_1.numero_processo, precatorios_2.id
  • Sort Method: quicksort Memory: 471kB
15. 0.869 5.852 ↓ 1.0 2,656 1

Hash Join (cost=322.60..599.79 rows=2,655 width=62) (actual time=3.119..5.852 rows=2,656 loops=1)

  • Hash Cond: (precatorio_participantes_1.participante_id = participantes_1.id)
16. 0.644 3.986 ↓ 1.0 2,656 1

Hash Join (cost=192.93..426.98 rows=2,655 width=42) (actual time=2.103..3.986 rows=2,656 loops=1)

  • Hash Cond: (precatorio_participantes_1.precatorio_id = precatorios_2.id)
17. 1.251 1.251 ↓ 1.0 2,656 1

Seq Scan on precatorio_participantes precatorio_participantes_1 (cost=0.00..194.22 rows=2,655 width=17) (actual time=0.002..1.251 rows=2,656 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4868
18. 0.378 2.091 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 123kB
19. 0.685 1.713 ↓ 1.0 1,908 1

Hash Join (cost=78.42..169.09 rows=1,907 width=33) (actual time=0.624..1.713 rows=1,908 loops=1)

  • Hash Cond: (precatorios_2.processo_principal_id = processo_principais_1.id)
20. 0.414 0.414 ↓ 1.0 1,908 1

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

21. 0.302 0.614 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
22. 0.312 0.312 ↓ 1.0 2,064 1

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

23. 0.544 0.997 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 220kB
24. 0.453 0.453 ↓ 1.0 3,142 1

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

25. 0.105 1,532.247 ↓ 29.8 596 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 52kB
26. 0.121 1,532.142 ↓ 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,531.985..1,532.142 rows=596 loops=1)

27. 3.346 1,532.021 ↓ 29.8 596 1

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

  • Sort Key: tab1.numero_processo_principal, tab1.participantes_nome
  • Sort Method: quicksort Memory: 183kB
28. 3.334 1,528.675 ↓ 29.8 596 1

Subquery Scan on tab1 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=108.004..1,528.675 rows=596 loops=1)

  • Filter: (tab1.data_evento_id = (SubPlan 4))
  • Rows Removed by Filter: 638
29. 2.987 105.007 ↑ 3.2 1,234 1

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

30. 30.578 102.020 ↑ 1.0 3,944 1

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

  • 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: 1144kB
31. 1.468 71.442 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas (cost=1,374.15..1,423.45 rows=3,944 width=151) (actual time=69.524..71.442 rows=3,944 loops=1)

32. 47.766 69.974 ↑ 1.0 3,944 1

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

  • Sort Key: precatorios_3.id, participantes_2.nome, tipo_papeis_1.descricao, evento_financeiros.data_evento, evento_financeiros.id, configuracao_rubrica_precatorios.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
33. 7.023 22.208 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_3.processo_principal_id = processo_principais_2.id)
34. 2.132 14.570 ↑ 1.0 3,944 1

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

  • Hash Cond: ((configuracao_rubrica_precatorios.precatorio_id = precatorios_3.id) AND (configuracao_rubrica_precatorios.tipo_rubrica_id = tipo_rubricas.id))
35. 0.101 0.101 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios (cost=0.00..15.93 rows=793 width=12) (actual time=0.003..0.101 rows=793 loops=1)

36. 2.097 12.337 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
37. 1.288 10.240 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos.tipo_rubrica_id = tipo_rubricas.id)
38. 1.978 8.937 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos.evento_financeiro_id = evento_financeiros.id)
39. 0.395 0.395 ↑ 1.0 3,944 1

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

40. 0.558 6.564 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
41. 0.444 6.006 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.tipo_papel_id = tipo_papeis_1.id)
42. 0.366 5.556 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.participante_id = participantes_2.id)
43. 0.372 4.174 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.precatorio_id = precatorios_3.id)
44. 0.368 3.190 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros.tipo_evento_financeiro_id = tipo_evento_financeiros.id)
45. 0.952 2.814 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.id = evento_financeiros.precatorio_participante_id)
46. 1.325 1.325 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_2 (cost=0.00..194.22 rows=7,522 width=48) (actual time=0.004..1.325 rows=7,524 loops=1)

47. 0.253 0.537 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
48. 0.284 0.284 ↑ 1.0 1,234 1

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

49. 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
50. 0.004 0.004 ↑ 1.0 9 1

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

51. 0.262 0.612 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
52. 0.350 0.350 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_3 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.350 rows=1,908 loops=1)

53. 0.532 1.016 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
54. 0.484 0.484 ↓ 1.0 3,142 1

Seq Scan on participantes participantes_2 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.002..0.484 rows=3,142 loops=1)

55. 0.001 0.006 ↑ 1.0 6 1

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

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

Seq Scan on tipo_papeis tipo_papeis_1 (cost=0.00..1.06 rows=6 width=16) (actual time=0.002..0.005 rows=6 loops=1)

57. 0.006 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
58. 0.009 0.009 ↑ 1.0 35 1

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

59. 0.295 0.615 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
60. 0.320 0.320 ↓ 1.0 2,064 1

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

61.          

SubPlan (for Subquery Scan)

62. 2.468 1,420.334 ↑ 1.0 1 1,234

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

63. 7.404 1,417.866 ↑ 1.5 2 1,234

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

64. 78.976 1,410.462 ↓ 2.3 7 1,234

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

  • 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
65. 3.702 1,331.486 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_8 (cost=200.00..200.04 rows=3 width=151) (actual time=1.077..1.079 rows=7 loops=1,234)

66. 88.848 1,327.784 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_16.id, participantes_14.nome, tipo_papeis_11.descricao, evento_financeiros_11.data_evento, evento_financeiros_11.id, configuracao_rubrica_precatorios_10.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
67. 34.138 1,238.936 ↓ 2.3 7 1,234

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

68. 119.698 1,188.342 ↓ 2.3 7 1,234

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

  • Hash Cond: ((configuracao_rubrica_precatorios_10.precatorio_id = precatorios_16.id) AND (configuracao_rubrica_precatorios_10.tipo_rubrica_id = tipo_rubricas_10.id))
69. 64.168 64.168 ↑ 1.0 793 1,234

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

70. 7.404 1,004.476 ↓ 2.3 7 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
71. 2.054 997.072 ↓ 2.3 7 1,234

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

72. 2.468 978.562 ↓ 2.3 7 1,234

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

73. 3.702 39.488 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_15.tipo_papel_id = tipo_papeis_11.id)
  • Rows Removed by Join Filter: 5
74. 1.234 34.552 ↑ 1.0 1 1,234

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

75. 2.468 19.744 ↑ 1.0 1 1,234

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

76. 13.574 13.574 ↑ 1.0 1 1,234

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

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

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

  • Index Cond: (id = precatorio_participantes_15.precatorio_id)
78. 13.574 13.574 ↑ 1.0 1 1,234

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

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

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

80. 12.340 936.606 ↓ 2.3 7 1,234

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

  • Join Filter: (evento_financeiros_11.tipo_evento_financeiro_id = tipo_evento_financeiros_11.id)
  • Rows Removed by Join Filter: 21
81. 450.410 924.266 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_10.evento_financeiro_id = evento_financeiros_11.id)
82. 327.010 327.010 ↑ 1.0 3,944 1,234

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

83. 2.468 146.846 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
84. 144.378 144.378 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_11 (cost=0.00..33.42 rows=2 width=37) (actual time=0.059..0.117 rows=2 loops=1,234)

  • Filter: (precatorio_participante_id = tab1.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
85. 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)

86. 0.007 0.007 ↑ 1.0 4 1

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

  • Filter: saldo
  • Rows Removed by Filter: 5
87. 16.456 16.456 ↑ 1.0 1 8,228

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=8,228)

  • Index Cond: (id = rubrica_eventos_10.tipo_rubrica_id)
88. 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_16.processo_principal_id)
89. 0.980 2.109 ↓ 1.0 7,524 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 315kB
90. 1.129 1.129 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes (cost=0.00..194.22 rows=7,522 width=24) (actual time=0.004..1.129 rows=7,524 loops=1)

91. 0.307 0.753 ↓ 1.0 2,140 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 101kB
92. 0.446 0.446 ↓ 1.0 2,140 1

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

93. 0.000 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
94. 0.001 0.001 ↓ 0.0 0 1

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

95.          

SubPlan (for GroupAggregate)

96. 0.360 858.600 ↑ 1.0 1 360

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

97. 1.440 858.240 ↓ 0.0 0 360

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

  • Sort Key: tab1_5.numero_processo_principal, tab1_5.participantes_nome
  • Sort Method: quicksort Memory: 25kB
98. 0.360 856.800 ↓ 0.0 0 360

Subquery Scan on tab1_5 (cost=416.30..816.93 rows=1 width=151) (actual time=2.341..2.380 rows=0 loops=360)

  • Filter: (tab1_5.data_evento_id = (SubPlan 2))
  • Rows Removed by Filter: 0
99. 3.240 829.080 ↓ 0.0 0 360

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

  • Filter: CASE WHEN (sum(precatorios_eventos_rubricas_7.valor_com_sinal) <= 0::double precision) THEN true ELSE false END
  • Rows Removed by Filter: 3
100. 34.920 825.840 ↓ 5.5 11 360

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

  • 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: 56kB
101. 1.800 790.920 ↓ 5.5 11 360

Subquery Scan on precatorios_eventos_rubricas_7 (cost=416.26..416.29 rows=2 width=151) (actual time=2.193..2.197 rows=11 loops=360)

102. 46.800 789.120 ↓ 5.5 11 360

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

  • Sort Key: participantes_13.nome, tipo_papeis_10.descricao, evento_financeiros_10.data_evento, evento_financeiros_10.id, configuracao_rubrica_precatorios_9.ordem_apresentacao
  • Sort Method: quicksort Memory: 86kB
103. 15.248 742.320 ↓ 5.5 11 360

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

  • Join Filter: ((precatorios_15.id = configuracao_rubrica_precatorios_9.precatorio_id) AND (tipo_rubricas_9.id = configuracao_rubrica_precatorios_9.tipo_rubrica_id))
  • Rows Removed by Join Filter: 39
104. 1.832 695.520 ↓ 5.5 11 360

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

105. 1.440 685.800 ↓ 5.5 11 360

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

106. 2.520 2.520 ↑ 1.0 1 360

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

  • Index Cond: (id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
107. 3.632 681.840 ↓ 5.5 11 360

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

108. 137.880 670.320 ↓ 5.5 11 360

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

  • Hash Cond: (rubrica_eventos_9.evento_financeiro_id = evento_financeiros_10.id)
109. 98.640 98.640 ↑ 1.0 3,944 360

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

110. 1.080 433.800 ↓ 3.0 3 360

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
111. 3.086 432.720 ↓ 3.0 3 360

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

  • Join Filter: (precatorio_participantes_14.tipo_papel_id = tipo_papeis_10.id)
  • Rows Removed by Join Filter: 17
112. 1.492 428.400 ↓ 3.0 3 360

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

113. 2.212 424.440 ↓ 3.0 3 360

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

114. 34.560 419.760 ↓ 3.0 3 360

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

  • Hash Cond: (evento_financeiros_10.precatorio_participante_id = precatorio_participantes_14.id)
115. 77.400 77.400 ↑ 1.0 1,234 360

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

116. 1.080 307.800 ↑ 1.0 4 360

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
117. 306.720 306.720 ↑ 1.0 4 360

Seq Scan on precatorio_participantes precatorio_participantes_14 (cost=0.00..213.03 rows=4 width=48) (actual time=0.162..0.852 rows=4 loops=360)

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

Index Scan using tipo_evento_financeiros_pkey on tipo_evento_financeiros tipo_evento_financeiros_10 (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_10.tipo_evento_financeiro_id)
119. 2.468 2.468 ↑ 1.0 1 1,234

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,234)

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

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

121. 7.888 7.888 ↑ 1.0 1 3,944

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

  • Index Cond: (id = rubrica_eventos_9.tipo_rubrica_id)
122. 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_15.processo_principal_id)
123. 3.112 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)

124. 28.440 28.440 ↑ 1.0 2 360

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_9 (cost=0.00..17.91 rows=2 width=12) (actual time=0.043..0.079 rows=2 loops=360)

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

SubPlan (for Subquery Scan)

126. 0.100 27.360 ↑ 1.0 1 20

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

127. 0.260 27.260 ↑ 1.0 3 20

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

128. 2.360 27.000 ↓ 4.0 12 20

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

  • 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: 32kB
129. 0.120 24.640 ↓ 4.0 12 20

Subquery Scan on precatorios_eventos_rubricas_6 (cost=200.00..200.04 rows=3 width=151) (actual time=1.227..1.232 rows=12 loops=20)

130. 3.260 24.520 ↓ 4.0 12 20

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

  • Sort Key: precatorios_14.id, participantes_12.nome, tipo_papeis_9.descricao, evento_financeiros_9.data_evento, evento_financeiros_9.id, configuracao_rubrica_precatorios_8.ordem_apresentacao
  • Sort Method: quicksort Memory: 40kB
131. 0.958 21.260 ↓ 4.0 12 20

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

132. 2.020 19.820 ↓ 4.0 12 20

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

  • Hash Cond: ((configuracao_rubrica_precatorios_8.precatorio_id = precatorios_14.id) AND (configuracao_rubrica_precatorios_8.tipo_rubrica_id = tipo_rubricas_8.id))
133. 1.080 1.080 ↑ 1.0 793 20

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_8 (cost=0.00..15.93 rows=793 width=12) (actual time=0.002..0.054 rows=793 loops=20)

134. 0.200 16.720 ↓ 4.0 12 20

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

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
135. 0.299 16.520 ↓ 4.0 12 20

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

136. 0.060 15.980 ↓ 4.0 12 20

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

137. 0.080 0.500 ↑ 1.0 1 20

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

  • Join Filter: (precatorio_participantes_13.tipo_papel_id = tipo_papeis_9.id)
  • Rows Removed by Join Filter: 5
138. 0.060 0.380 ↑ 1.0 1 20

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

139. 0.040 0.260 ↑ 1.0 1 20

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

140. 0.160 0.160 ↑ 1.0 1 20

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

  • Index Cond: (id = tab1_5.precatorio_participantes_id)
141. 0.060 0.060 ↑ 1.0 1 20

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

  • Index Cond: (id = precatorio_participantes_13.precatorio_id)
142. 0.060 0.060 ↑ 1.0 1 20

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=20)

  • Index Cond: (id = precatorio_participantes_13.participante_id)
143. 0.040 0.040 ↑ 1.0 6 20

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

144. 0.440 15.420 ↓ 4.0 12 20

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

  • Join Filter: (evento_financeiros_9.tipo_evento_financeiro_id = tipo_evento_financeiros_9.id)
  • Rows Removed by Join Filter: 52
145. 7.280 14.980 ↓ 2.7 16 20

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

  • Hash Cond: (rubrica_eventos_8.evento_financeiro_id = evento_financeiros_9.id)
146. 5.180 5.180 ↑ 1.0 3,944 20

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

147. 0.060 2.520 ↓ 2.0 4 20

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
148. 2.460 2.460 ↓ 2.0 4 20

Seq Scan on evento_financeiros evento_financeiros_9 (cost=0.00..33.42 rows=2 width=37) (actual time=0.011..0.123 rows=4 loops=20)

  • Filter: (precatorio_participante_id = tab1_5.precatorio_participantes_id)
  • Rows Removed by Filter: 1230
149. 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)

150. 0.007 0.007 ↑ 1.0 4 1

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

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

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.001 rows=1 loops=241)

  • Index Cond: (id = rubrica_eventos_8.tipo_rubrica_id)
152. 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_14.processo_principal_id)
153. 1.541 535.669 ↑ 15.5 1,494 1

Hash (cost=9,940.40..9,940.40 rows=23,229 width=1,130) (actual time=535.669..535.669 rows=1,494 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 975kB
154. 1.488 534.128 ↑ 15.5 1,494 1

Hash Right Join (cost=9,614.86..9,940.40 rows=23,229 width=1,130) (actual time=526.008..534.128 rows=1,494 loops=1)

  • Hash Cond: (pp_1.precatorio_id = precatorios.id)
155. 6.468 11.436 ↑ 1.2 1,628 1

GroupAggregate (cost=571.46..616.16 rows=1,881 width=34) (actual time=4.788..11.436 rows=1,628 loops=1)

156. 1.019 4.968 ↑ 1.0 2,825 1

Sort (cost=571.46..578.52 rows=2,825 width=34) (actual time=4.775..4.968 rows=2,825 loops=1)

  • Sort Key: pp_1.precatorio_id
  • Sort Method: quicksort Memory: 317kB
157. 1.199 3.949 ↑ 1.0 2,825 1

Hash Join (cost=288.25..409.53 rows=2,825 width=34) (actual time=2.225..3.949 rows=2,825 loops=1)

  • Hash Cond: (depre.precatorio_participante_id = pp_1.id)
158. 0.564 0.564 ↑ 1.0 2,825 1

Seq Scan on precatorio_participante_numero_depres depre (cost=0.00..61.25 rows=2,825 width=30) (actual time=0.028..0.564 rows=2,825 loops=1)

159. 1.058 2.186 ↓ 1.0 7,524 1

Hash (cost=194.22..194.22 rows=7,522 width=16) (actual time=2.186..2.186 rows=7,524 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 353kB
160. 1.128 1.128 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes pp_1 (cost=0.00..194.22 rows=7,522 width=16) (actual time=0.003..1.128 rows=7,524 loops=1)

161. 1.492 521.204 ↑ 15.5 1,494 1

Hash (cost=8,753.04..8,753.04 rows=23,229 width=1,098) (actual time=521.204..521.204 rows=1,494 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 937kB
162. 1.533 519.712 ↑ 15.5 1,494 1

Hash Right Join (cost=7,994.21..8,753.04 rows=23,229 width=1,098) (actual time=513.474..519.712 rows=1,494 loops=1)

  • Hash Cond: (precatorios_4.id = precatorios.id)
163. 3.925 48.409 ↑ 4.0 1,882 1

GroupAggregate (cost=1,236.19..1,612.29 rows=7,522 width=87) (actual time=43.694..48.409 rows=1,882 loops=1)

164. 35.668 44.484 ↓ 1.0 7,524 1

Sort (cost=1,236.19..1,254.99 rows=7,522 width=87) (actual time=43.670..44.484 rows=7,524 loops=1)

  • Sort Key: processo_principais_3.numero_processo, precatorios_4.id
  • Sort Method: quicksort Memory: 1271kB
165. 2.480 8.816 ↓ 1.0 7,524 1

Hash Join (cost=322.60..751.88 rows=7,522 width=87) (actual time=3.056..8.816 rows=7,524 loops=1)

  • Hash Cond: (precatorio_participantes_3.participante_id = participantes_3.id)
166. 1.775 5.243 ↓ 1.0 7,524 1

Hash Join (cost=192.93..499.98 rows=7,522 width=41) (actual time=1.951..5.243 rows=7,524 loops=1)

  • Hash Cond: (precatorio_participantes_3.precatorio_id = precatorios_4.id)
167. 1.528 1.528 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_3 (cost=0.00..194.22 rows=7,522 width=16) (actual time=0.002..1.528 rows=7,524 loops=1)

168. 0.312 1.940 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 123kB
169. 0.610 1.628 ↓ 1.0 1,908 1

Hash Join (cost=78.42..169.09 rows=1,907 width=33) (actual time=0.620..1.628 rows=1,908 loops=1)

  • Hash Cond: (precatorios_4.processo_principal_id = processo_principais_3.id)
170. 0.409 0.409 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_4 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.409 rows=1,908 loops=1)

171. 0.297 0.609 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
172. 0.312 0.312 ↓ 1.0 2,064 1

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

173. 0.548 1.093 ↓ 1.0 3,142 1

Hash (cost=90.41..90.41 rows=3,141 width=62) (actual time=1.093..1.093 rows=3,142 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 261kB
174. 0.545 0.545 ↓ 1.0 3,142 1

Seq Scan on participantes participantes_3 (cost=0.00..90.41 rows=3,141 width=62) (actual time=0.003..0.545 rows=3,142 loops=1)

175. 1.644 469.770 ↑ 3.9 1,494 1

Hash (cost=6,684.41..6,684.41 rows=5,889 width=970) (actual time=469.770..469.770 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 684kB
176. 0.756 468.126 ↑ 3.9 1,494 1

Hash Join (cost=5,471.87..6,684.41 rows=5,889 width=970) (actual time=425.694..468.126 rows=1,494 loops=1)

  • Hash Cond: (precatorios.tipo_origem_informacao_id = tipo_origem_informacoes.id)
177. 0.432 467.359 ↑ 3.9 1,494 1

Hash Left Join (cost=5,470.78..6,602.35 rows=5,889 width=953) (actual time=425.674..467.359 rows=1,494 loops=1)

  • Hash Cond: (precatorios.modo_lancamento_valor_id = modo_lancamento_valores.id)
178. 0.593 466.921 ↑ 3.9 1,494 1

Hash Left Join (cost=5,469.74..6,568.01 rows=5,889 width=945) (actual time=425.659..466.921 rows=1,494 loops=1)

  • Hash Cond: ((max(prec_part_1.categoria_precatorio_id)) = categoria_precatorios.id)
179. 1.403 466.319 ↑ 3.9 1,494 1

Hash Right Join (cost=5,468.69..6,544.29 rows=5,889 width=931) (actual time=425.632..466.319 rows=1,494 loops=1)

  • Hash Cond: (precatorios_5.id = precatorios.id)
180. 16.812 94.067 ↑ 1.0 1,882 1

GroupAggregate (cost=1,095.97..2,074.54 rows=1,907 width=64) (actual time=54.772..94.067 rows=1,882 loops=1)

181. 2.376 77.255 ↓ 1.0 7,787 1

Merge Join (cost=1,095.97..1,274.14 rows=7,522 width=64) (actual time=54.706..77.255 rows=7,787 loops=1)

  • Merge Cond: (precatorios_5.id = precatorio_participantes_4.precatorio_id)
182. 19.250 19.250 ↓ 1.0 1,908 1

Index Only Scan using precatorios_pkey on precatorios precatorios_5 (cost=0.28..60.88 rows=1,907 width=8) (actual time=0.035..19.250 rows=1,908 loops=1)

  • Heap Fetches: 132
183. 4.105 55.629 ↓ 1.0 7,787 1

Sort (cost=1,095.69..1,114.50 rows=7,522 width=64) (actual time=54.663..55.629 rows=7,787 loops=1)

  • Sort Key: precatorio_participantes_4.precatorio_id
  • Sort Method: quicksort Memory: 680kB
184. 2.535 51.524 ↓ 1.0 7,787 1

Hash Left Join (cost=496.37..611.39 rows=7,522 width=64) (actual time=46.213..51.524 rows=7,787 loops=1)

  • Hash Cond: (precatorio_participantes_4.rpv_id = rpvs_1.id)
185. 2.382 8.313 ↓ 1.0 7,787 1

Hash Right Join (cost=418.26..469.92 rows=7,522 width=48) (actual time=5.521..8.313 rows=7,787 loops=1)

  • Hash Cond: (oficio_orcamentarios_normais.precatorio_participante_id = precatorio_participantes_4.id)
186. 0.432 0.432 ↑ 1.0 1,043 1

Seq Scan on oficio_orcamentarios oficio_orcamentarios_normais (cost=0.00..29.49 rows=1,043 width=20) (actual time=0.005..0.432 rows=1,043 loops=1)

  • Filter: (NOT preferencial)
  • Rows Removed by Filter: 306
187. 1.273 5.499 ↓ 1.0 7,524 1

Hash (cost=324.24..324.24 rows=7,522 width=40) (actual time=5.499..5.499 rows=7,524 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 377kB
188. 1.337 4.226 ↓ 1.0 7,524 1

Hash Right Join (cost=288.25..324.24 rows=7,522 width=40) (actual time=2.581..4.226 rows=7,524 loops=1)

  • Hash Cond: (oficio_orcamentarios_preferenciais.precatorio_participante_id = precatorio_participantes_4.id)
189. 0.365 0.365 ↑ 1.0 306 1

Seq Scan on oficio_orcamentarios oficio_orcamentarios_preferenciais (cost=0.00..29.49 rows=306 width=20) (actual time=0.047..0.365 rows=306 loops=1)

  • Filter: preferencial
  • Rows Removed by Filter: 1043
190. 1.283 2.524 ↓ 1.0 7,524 1

Hash (cost=194.22..194.22 rows=7,522 width=32) (actual time=2.524..2.524 rows=7,524 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 373kB
191. 1.241 1.241 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_4 (cost=0.00..194.22 rows=7,522 width=32) (actual time=0.005..1.241 rows=7,524 loops=1)

192. 0.976 40.676 ↓ 1.0 2,140 1

Hash (cost=51.38..51.38 rows=2,138 width=32) (actual time=40.676..40.676 rows=2,140 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
193. 39.700 39.700 ↓ 1.0 2,140 1

Seq Scan on rpvs rpvs_1 (cost=0.00..51.38 rows=2,138 width=32) (actual time=0.004..39.700 rows=2,140 loops=1)

194. 1.004 370.849 ↑ 3.9 1,494 1

Hash (cost=4,299.11..4,299.11 rows=5,889 width=547) (actual time=370.849..370.849 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 495kB
195. 0.761 369.845 ↑ 3.9 1,494 1

Hash Right Join (cost=4,175.00..4,299.11 rows=5,889 width=547) (actual time=369.080..369.845 rows=1,494 loops=1)

  • Hash Cond: (precatorios_eventos_rubricas_1.precatorios_id = precatorios.id)
196. 0.044 106.601 ↑ 175.1 10 1

GroupAggregate (cost=1,090.81..1,125.83 rows=1,751 width=41) (actual time=106.587..106.601 rows=10 loops=1)

197. 0.272 106.557 ↑ 22.2 79 1

Sort (cost=1,090.81..1,095.19 rows=1,751 width=41) (actual time=106.554..106.557 rows=79 loops=1)

  • Sort Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
  • Sort Method: quicksort Memory: 31kB
198. 0.031 106.285 ↑ 22.2 79 1

Subquery Scan on precatorios_eventos_rubricas_1 (cost=974.60..996.49 rows=1,751 width=41) (actual time=106.251..106.285 rows=79 loops=1)

199. 0.758 106.254 ↑ 22.2 79 1

Sort (cost=974.60..978.98 rows=1,751 width=212) (actual time=106.248..106.254 rows=79 loops=1)

  • Sort Key: precatorios_6.id, participantes_4.nome, tipo_papeis_2.descricao, evento_financeiros_1.data_evento, evento_financeiros_1.id, configuracao_rubrica_precatorios_1.ordem_apresentacao
  • Sort Method: quicksort Memory: 65kB
200. 0.477 105.496 ↑ 22.2 79 1

Hash Join (cost=764.80..880.27 rows=1,751 width=212) (actual time=104.937..105.496 rows=79 loops=1)

  • Hash Cond: (processo_principais_4.id = precatorios_6.processo_principal_id)
201. 0.166 0.166 ↓ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_4 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.007..0.166 rows=2,064 loops=1)

202. 0.089 104.853 ↑ 22.2 79 1

Hash (cost=742.91..742.91 rows=1,751 width=195) (actual time=104.853..104.853 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
203. 0.230 104.764 ↑ 22.2 79 1

Hash Right Join (cost=718.84..742.91 rows=1,751 width=195) (actual time=84.747..104.764 rows=79 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios_1.precatorio_id = precatorios_6.id) AND (configuracao_rubrica_precatorios_1.tipo_rubrica_id = tipo_rubricas_1.id))
204. 25.372 25.372 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_1 (cost=0.00..15.93 rows=793 width=12) (actual time=5.557..25.372 rows=793 loops=1)

205. 0.061 79.162 ↑ 22.2 79 1

Hash (cost=692.58..692.58 rows=1,751 width=191) (actual time=79.162..79.162 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
206. 0.049 79.101 ↑ 22.2 79 1

Hash Join (cost=535.76..692.58 rows=1,751 width=191) (actual time=12.425..79.101 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_1.tipo_rubrica_id = tipo_rubricas_1.id)
207. 0.543 79.036 ↑ 22.2 79 1

Hash Join (cost=533.97..666.71 rows=1,751 width=168) (actual time=12.401..79.036 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_1.evento_financeiro_id = evento_financeiros_1.id)
208. 73.362 73.362 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_1 (cost=0.00..100.44 rows=3,944 width=32) (actual time=7.249..73.362 rows=3,944 loops=1)

209. 0.019 5.131 ↑ 27.4 20 1

Hash (cost=527.12..527.12 rows=548 width=144) (actual time=5.131..5.131 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
210. 0.021 5.112 ↑ 27.4 20 1

Hash Join (cost=265.15..527.12 rows=548 width=144) (actual time=3.333..5.112 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.tipo_papel_id = tipo_papeis_2.id)
211. 0.018 5.078 ↑ 27.4 20 1

Hash Join (cost=264.02..518.45 rows=548 width=136) (actual time=3.312..5.078 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.participante_id = participantes_4.id)
212. 0.022 2.787 ↑ 27.4 20 1

Hash Join (cost=134.34..379.88 rows=548 width=108) (actual time=1.029..2.787 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.precatorio_id = precatorios_6.id)
213. 0.556 2.168 ↑ 27.4 20 1

Hash Join (cost=48.44..285.75 rows=548 width=100) (actual time=0.417..2.168 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.id = evento_financeiros_1.precatorio_participante_id)
214. 1.231 1.231 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_5 (cost=0.00..194.22 rows=7,522 width=48) (actual time=0.004..1.231 rows=7,524 loops=1)

215. 0.011 0.381 ↑ 27.4 20 1

Hash (cost=41.59..41.59 rows=548 width=60) (actual time=0.381..0.381 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
216. 0.104 0.370 ↑ 27.4 20 1

Hash Join (cost=1.14..41.59 rows=548 width=60) (actual time=0.029..0.370 rows=20 loops=1)

  • Hash Cond: (evento_financeiros_1.tipo_evento_financeiro_id = tipo_evento_financeiros_1.id)
217. 0.255 0.255 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_1 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.004..0.255 rows=1,234 loops=1)

218. 0.002 0.011 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=31) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
219. 0.009 0.009 ↑ 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.006..0.009 rows=4 loops=1)

  • Filter: pagamento
  • Rows Removed by Filter: 5
220. 0.249 0.597 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
221. 0.348 0.348 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_6 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.348 rows=1,908 loops=1)

222. 1.329 2.273 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
223. 0.944 0.944 ↓ 1.0 3,142 1

Seq Scan on participantes participantes_4 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.005..0.944 rows=3,142 loops=1)

224. 0.007 0.013 ↑ 1.0 6 1

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

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

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

226. 0.006 0.016 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
227. 0.010 0.010 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_1 (cost=0.00..1.35 rows=35 width=31) (actual time=0.003..0.010 rows=35 loops=1)

228. 0.993 262.483 ↑ 3.9 1,494 1

Hash (cost=3,010.57..3,010.57 rows=5,889 width=539) (actual time=262.483..262.483 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 495kB
229. 1.060 261.490 ↑ 3.9 1,494 1

Hash Right Join (cost=2,995.53..3,010.57 rows=5,889 width=539) (actual time=260.444..261.490 rows=1,494 loops=1)

  • Hash Cond: (precatorio_participantes_6.precatorio_id = precatorios.id)
230. 0.002 20.763 ↓ 0.0 0 1

HashAggregate (cost=229.54..232.01 rows=247 width=8) (actual time=20.763..20.763 rows=0 loops=1)

231. 0.001 20.761 ↓ 0.0 0 1

Nested Loop (cost=1.39..228.31 rows=247 width=8) (actual time=20.761..20.761 rows=0 loops=1)

232. 0.099 20.760 ↓ 0.0 0 1

Hash Semi Join (cost=1.10..37.43 rows=247 width=8) (actual time=20.760..20.760 rows=0 loops=1)

  • Hash Cond: (evento_financeiros_2.tipo_evento_financeiro_id = tipo_evento_financeiros_2.id)
233. 20.655 20.655 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_2 (cost=0.00..30.34 rows=1,234 width=16) (actual time=0.007..20.655 rows=1,234 loops=1)

234. 0.001 0.006 ↑ 1.0 1 1

Hash (cost=1.09..1.09 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=1)

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

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_2 (cost=0.00..1.09 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: sequestro
  • Rows Removed by Filter: 8
236. 0.000 0.000 ↓ 0.0 0

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_6 (cost=0.28..0.76 rows=1 width=16) (never executed)

  • Index Cond: (id = evento_financeiros_2.precatorio_participante_id)
237. 1.009 239.667 ↑ 3.9 1,494 1

Hash (cost=2,692.37..2,692.37 rows=5,889 width=531) (actual time=239.667..239.667 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 495kB
238. 1.294 238.658 ↑ 3.9 1,494 1

Hash Right Join (cost=2,360.81..2,692.37 rows=5,889 width=531) (actual time=229.275..238.658 rows=1,494 loops=1)

  • Hash Cond: (prec_part_1.precatorio_id = precatorios.id)
239. 7.678 36.913 ↑ 4.0 1,882 1

GroupAggregate (cost=1,295.40..1,464.64 rows=7,522 width=63) (actual time=28.814..36.913 rows=1,882 loops=1)

240. 18.877 29.235 ↓ 1.0 7,524 1

Sort (cost=1,295.40..1,314.20 rows=7,522 width=63) (actual time=28.779..29.235 rows=7,524 loops=1)

  • Sort Key: prec_part_1.precatorio_id, proc.numero_processo
  • Sort Method: quicksort Memory: 968kB
241. 2.352 10.358 ↓ 1.0 7,524 1

Hash Join (cost=323.65..811.10 rows=7,522 width=63) (actual time=2.719..10.358 rows=7,524 loops=1)

  • Hash Cond: (prec_part_1.participante_id = participantes_5.id)
242. 1.257 7.177 ↓ 1.0 7,524 1

Hash Left Join (cost=193.98..559.19 rows=7,522 width=71) (actual time=1.878..7.177 rows=7,524 loops=1)

  • Hash Cond: (prec_part_1.categoria_precatorio_id = cat.id)
243. 1.878 5.916 ↓ 1.0 7,524 1

Hash Join (cost=192.93..499.98 rows=7,522 width=49) (actual time=1.861..5.916 rows=7,524 loops=1)

  • Hash Cond: (prec_part_1.precatorio_id = prec.id)
244. 2.193 2.193 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes prec_part_1 (cost=0.00..194.22 rows=7,522 width=24) (actual time=0.002..2.193 rows=7,524 loops=1)

245. 0.278 1.845 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 123kB
246. 0.545 1.567 ↓ 1.0 1,908 1

Hash Join (cost=78.42..169.09 rows=1,907 width=33) (actual time=0.648..1.567 rows=1,908 loops=1)

  • Hash Cond: (prec.processo_principal_id = proc.id)
247. 0.389 0.389 ↓ 1.0 1,908 1

Seq Scan on precatorios prec (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.389 rows=1,908 loops=1)

248. 0.307 0.633 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
249. 0.326 0.326 ↓ 1.0 2,064 1

Seq Scan on processo_principais proc (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.004..0.326 rows=2,064 loops=1)

250. 0.000 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=30) (actual time=0.004..0.004 rows=2 loops=1)

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

Seq Scan on categoria_precatorios cat (cost=0.00..1.02 rows=2 width=30) (actual time=0.003..0.004 rows=2 loops=1)

252. 0.411 0.829 ↓ 1.0 3,142 1

Hash (cost=90.41..90.41 rows=3,141 width=8) (actual time=0.829..0.829 rows=3,142 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 123kB
253. 0.418 0.418 ↓ 1.0 3,142 1

Seq Scan on participantes participantes_5 (cost=0.00..90.41 rows=3,141 width=8) (actual time=0.005..0.418 rows=3,142 loops=1)

254. 0.969 200.451 ↓ 1.0 1,494 1

Hash (cost=1,046.75..1,046.75 rows=1,493 width=515) (actual time=200.451..200.451 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 469kB
255. 0.444 199.482 ↓ 1.0 1,494 1

Hash Left Join (cost=826.94..1,046.75 rows=1,493 width=515) (actual time=144.248..199.482 rows=1,494 loops=1)

  • Hash Cond: (precatorios.fase_id = fases.id)
256. 0.299 199.034 ↓ 1.0 1,494 1

Hash Left Join (cost=825.88..1,032.35 rows=1,493 width=503) (actual time=144.235..199.034 rows=1,494 loops=1)

  • Hash Cond: (precatorios.detalhe_natureza_precatorio_id = detalhe_natureza_precatorios.id)
257. 0.949 198.707 ↓ 1.0 1,494 1

Hash Right Join (cost=824.81..1,025.68 rows=1,493 width=484) (actual time=144.189..198.707 rows=1,494 loops=1)

  • Hash Cond: (prec_part.precatorio_id = precatorios.id)
258. 0.070 83.806 ↑ 1.0 160 1

Hash Left Join (cost=130.81..329.83 rows=160 width=60) (actual time=30.226..83.806 rows=160 loops=1)

  • Hash Cond: (prec_part.tipo_papel_id = tipo_papeis.id)
259. 0.129 83.726 ↑ 1.0 160 1

Hash Left Join (cost=129.67..326.49 rows=160 width=52) (actual time=30.191..83.726 rows=160 loops=1)

  • Hash Cond: (prec_part.participante_id = participantes.id)
260. 54.307 54.307 ↑ 1.0 160 1

Seq Scan on precatorio_participantes prec_part (cost=0.00..194.22 rows=160 width=24) (actual time=0.869..54.307 rows=160 loops=1)

  • Filter: (encabecante IS TRUE)
  • Rows Removed by Filter: 7364
261. 0.656 29.290 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 220kB
262. 28.634 28.634 ↓ 1.0 3,142 1

Seq Scan on participantes (cost=0.00..90.41 rows=3,141 width=36) (actual time=6.796..28.634 rows=3,142 loops=1)

263. 0.004 0.010 ↑ 1.0 6 1

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

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

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

265. 0.934 113.952 ↓ 1.0 1,494 1

Hash (cost=675.34..675.34 rows=1,493 width=432) (actual time=113.952..113.952 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 448kB
266. 0.873 113.018 ↓ 1.0 1,494 1

Hash Right Join (cost=603.81..675.34 rows=1,493 width=432) (actual time=111.052..113.018 rows=1,494 loops=1)

  • Hash Cond: (p_prin_p_int.processo_principal_id = proc_prin.id)
267. 1.025 4.903 ↑ 1.1 975 1

GroupAggregate (cost=319.15..367.93 rows=1,084 width=76) (actual time=3.802..4.903 rows=975 loops=1)

268. 0.780 3.878 ↓ 1.0 1,085 1

Sort (cost=319.15..321.86 rows=1,084 width=76) (actual time=3.785..3.878 rows=1,085 loops=1)

  • Sort Key: p_prin_p_int.processo_principal_id, precatorios_7.id, p_prin.numero_processo
  • Sort Method: quicksort Memory: 201kB
269. 0.333 3.098 ↓ 1.0 1,085 1

Hash Join (cost=170.36..264.50 rows=1,084 width=76) (actual time=2.022..3.098 rows=1,085 loops=1)

  • Hash Cond: (p_prin_p_int.processo_interno_id = p_int.id)
270. 0.388 2.326 ↓ 1.0 1,085 1

Hash Join (cost=132.07..211.31 rows=1,084 width=57) (actual time=1.570..2.326 rows=1,085 loops=1)

  • Hash Cond: (precatorios_7.processo_principal_id = p_prin.id)
271. 0.386 0.386 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_7 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.004..0.386 rows=1,908 loops=1)

272. 0.263 1.552 ↓ 1.0 1,085 1

Hash (cost=118.52..118.52 rows=1,084 width=57) (actual time=1.552..1.552 rows=1,085 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
273. 0.403 1.289 ↓ 1.0 1,085 1

Hash Join (cost=78.42..118.52 rows=1,084 width=57) (actual time=0.671..1.289 rows=1,085 loops=1)

  • Hash Cond: (p_prin_p_int.processo_principal_id = p_prin.id)
274. 0.242 0.242 ↓ 1.0 1,085 1

Seq Scan on processo_principal_processo_internos p_prin_p_int (cost=0.00..23.84 rows=1,084 width=24) (actual time=0.013..0.242 rows=1,085 loops=1)

275. 0.307 0.644 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
276. 0.337 0.337 ↓ 1.0 2,064 1

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

277. 0.178 0.439 ↓ 1.0 1,125 1

Hash (cost=24.24..24.24 rows=1,124 width=27) (actual time=0.439..0.439 rows=1,125 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 65kB
278. 0.261 0.261 ↓ 1.0 1,125 1

Seq Scan on processo_internos p_int (cost=0.00..24.24 rows=1,124 width=27) (actual time=0.005..0.261 rows=1,125 loops=1)

279. 0.983 107.242 ↓ 1.0 1,494 1

Hash (cost=266.00..266.00 rows=1,493 width=368) (actual time=107.242..107.242 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 423kB
280. 0.420 106.259 ↓ 1.0 1,494 1

Hash Left Join (cost=119.43..266.00 rows=1,493 width=368) (actual time=88.975..106.259 rows=1,494 loops=1)

  • Hash Cond: (precatorios.responsavel_acompanhamento = usuarios.id)
281. 0.386 105.818 ↓ 1.0 1,494 1

Hash Join (cost=118.09..254.97 rows=1,493 width=348) (actual time=88.935..105.818 rows=1,494 loops=1)

  • Hash Cond: (precatorios.natureza_precatorio_id = natureza_precatorios.id)
282. 0.373 105.428 ↓ 1.0 1,494 1

Hash Join (cost=117.00..233.36 rows=1,493 width=334) (actual time=88.924..105.428 rows=1,494 loops=1)

  • Hash Cond: (proc_prin.departamento_responsavel_id = depto.id)
283. 0.452 105.050 ↓ 1.0 1,494 1

Hash Join (cost=115.76..211.58 rows=1,493 width=287) (actual time=88.909..105.050 rows=1,494 loops=1)

  • Hash Cond: (proc_prin.vara_id = varas.id)
284. 0.941 104.559 ↓ 1.0 1,494 1

Hash Join (cost=112.83..188.13 rows=1,493 width=221) (actual time=88.863..104.559 rows=1,494 loops=1)

  • Hash Cond: (proc_prin.id = precatorios.processo_principal_id)
285. 14.773 14.773 ↓ 1.0 2,064 1

Seq Scan on processo_principais proc_prin (cost=0.00..52.63 rows=2,063 width=49) (actual time=0.006..14.773 rows=2,064 loops=1)

286. 0.529 88.845 ↓ 1.0 1,494 1

Hash (cost=94.17..94.17 rows=1,493 width=180) (actual time=88.845..88.845 rows=1,494 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
287. 0.539 88.316 ↓ 1.0 1,494 1

Hash Join (cost=10.02..94.17 rows=1,493 width=180) (actual time=19.381..88.316 rows=1,494 loops=1)

  • Hash Cond: (precatorios.assunto_precatorio_id = assunto_precatorios.id)
288. 87.641 87.641 ↓ 1.0 1,908 1

Seq Scan on precatorios (cost=0.00..62.07 rows=1,907 width=83) (actual time=19.213..87.641 rows=1,908 loops=1)

289. 0.064 0.136 ↑ 1.0 223 1

Hash (cost=7.23..7.23 rows=223 width=105) (actual time=0.136..0.136 rows=223 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
290. 0.072 0.072 ↑ 1.0 223 1

Seq Scan on assunto_precatorios (cost=0.00..7.23 rows=223 width=105) (actual time=0.004..0.072 rows=223 loops=1)

291. 0.007 0.039 ↑ 1.0 23 1

Hash (cost=2.64..2.64 rows=23 width=74) (actual time=0.039..0.039 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
292. 0.019 0.032 ↑ 1.0 23 1

Hash Join (cost=1.09..2.64 rows=23 width=74) (actual time=0.016..0.032 rows=23 loops=1)

  • Hash Cond: (varas.tribunal_id = tribunais.id)
293. 0.007 0.007 ↑ 1.0 23 1

Seq Scan on varas (cost=0.00..1.23 rows=23 width=38) (actual time=0.002..0.007 rows=23 loops=1)

294. 0.003 0.006 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=44) (actual time=0.006..0.006 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
295. 0.003 0.003 ↑ 1.0 4 1

Seq Scan on tribunais (cost=0.00..1.04 rows=4 width=44) (actual time=0.003..0.003 rows=4 loops=1)

296. 0.000 0.005 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=55) (actual time=0.005..0.005 rows=11 loops=1)

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

Seq Scan on departamento_responsaveis depto (cost=0.00..1.11 rows=11 width=55) (actual time=0.002..0.005 rows=11 loops=1)

298. 0.002 0.004 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=22) (actual time=0.004..0.004 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
299. 0.002 0.002 ↑ 1.0 4 1

Seq Scan on natureza_precatorios (cost=0.00..1.04 rows=4 width=22) (actual time=0.002..0.002 rows=4 loops=1)

300. 0.004 0.021 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=28) (actual time=0.021..0.021 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
301. 0.017 0.017 ↑ 1.0 15 1

Seq Scan on usuarios (cost=0.00..1.15 rows=15 width=28) (actual time=0.016..0.017 rows=15 loops=1)

302. 0.004 0.028 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=27) (actual time=0.028..0.028 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
303. 0.024 0.024 ↑ 1.0 3 1

Seq Scan on detalhe_natureza_precatorios (cost=0.00..1.03 rows=3 width=27) (actual time=0.024..0.024 rows=3 loops=1)

304. 0.001 0.004 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=20) (actual time=0.004..0.004 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
305. 0.003 0.003 ↑ 1.0 3 1

Seq Scan on fases (cost=0.00..1.03 rows=3 width=20) (actual time=0.003..0.003 rows=3 loops=1)

306. 0.002 0.009 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=30) (actual time=0.009..0.009 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
307. 0.007 0.007 ↑ 1.0 2 1

Seq Scan on categoria_precatorios (cost=0.00..1.02 rows=2 width=30) (actual time=0.006..0.007 rows=2 loops=1)

308. 0.002 0.006 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=16) (actual time=0.006..0.006 rows=2 loops=1)

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

Seq Scan on modo_lancamento_valores (cost=0.00..1.02 rows=2 width=16) (actual time=0.003..0.004 rows=2 loops=1)

310. 0.002 0.011 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=25) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
311. 0.009 0.009 ↑ 1.0 4 1

Seq Scan on tipo_origem_informacoes (cost=0.00..1.04 rows=4 width=25) (actual time=0.007..0.009 rows=4 loops=1)

312. 0.139 13.192 ↓ 5.3 915 1

Hash (cost=190.89..190.89 rows=172 width=16) (actual time=13.192..13.192 rows=915 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 43kB
313. 0.386 13.053 ↓ 5.3 915 1

Hash Join (cost=121.66..190.89 rows=172 width=16) (actual time=12.299..13.053 rows=915 loops=1)

  • Hash Cond: (precatorios_1.processo_principal_id = processo_principais.id)
314. 0.380 0.380 ↓ 1.0 1,908 1

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

315. 0.409 12.287 ↓ 1,007.0 1,007 1

Hash (cost=121.65..121.65 rows=1 width=24) (actual time=12.287..12.287 rows=1,007 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
316. 3.484 11.878 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.72..121.65 rows=1 width=24) (actual time=1.820..11.878 rows=1,007 loops=1)

  • Join Filter: (tipo_pendencias.telas_id = telas.id)
  • Rows Removed by Join Filter: 22154
317. 0.412 6.380 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.72..120.16 rows=1 width=32) (actual time=1.814..6.380 rows=1,007 loops=1)

318. 0.815 3.954 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.44..119.81 rows=1 width=24) (actual time=1.793..3.954 rows=1,007 loops=1)

  • Join Filter: (tipo_pendencias.gravidade_pendencia_id = gravidade_pendencias.id)
  • Rows Removed by Join Filter: 2014
319. 0.129 2.132 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.44..118.75 rows=1 width=28) (actual time=1.785..2.132 rows=1,007 loops=1)

320. 0.049 0.049 ↑ 1.0 1 1

Seq Scan on tipo_pendencias (cost=0.00..2.42 rows=1 width=20) (actual time=0.047..0.049 rows=1 loops=1)

  • Filter: (id = 18)
  • Rows Removed by Filter: 20
321. 0.484 1.954 ↓ 2.9 1,007 1

HashAggregate (cost=109.44..112.88 rows=344 width=8) (actual time=1.736..1.954 rows=1,007 loops=1)

322. 0.631 1.470 ↓ 2.9 1,007 1

Nested Loop (cost=26.55..108.58 rows=344 width=8) (actual time=0.392..1.470 rows=1,007 loops=1)

  • Join Filter: ((('now'::cstring)::date - (pp.created_at)::date) > pn.valor_numerico)
  • Rows Removed by Join Filter: 82
323. 0.021 0.021 ↑ 1.0 1 1

Seq Scan on parametros_negocios pn (cost=0.00..1.02 rows=1 width=8) (actual time=0.020..0.021 rows=1 loops=1)

  • Filter: ((nome)::text = 'num_dias_pendencia_processo_interno'::text)
  • Rows Removed by Filter: 4
324. 0.679 0.818 ↓ 1.1 1,089 1

Seq Scan on processo_principais pp (cost=26.55..84.34 rows=1,032 width=16) (actual time=0.353..0.818 rows=1,089 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 975
325.          

SubPlan (for Seq Scan)

326. 0.139 0.139 ↓ 1.0 1,085 1

Seq Scan on processo_principal_processo_internos pp_pi (cost=0.00..23.84 rows=1,084 width=8) (actual time=0.003..0.139 rows=1,085 loops=1)

327. 1.007 1.007 ↑ 1.0 3 1,007

Seq Scan on gravidade_pendencias (cost=0.00..1.03 rows=3 width=8) (actual time=0.000..0.001 rows=3 loops=1,007)

328. 2.014 2.014 ↑ 1.0 1 1,007

Index Only Scan using processo_principais_pkey on processo_principais (cost=0.28..0.33 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,007)

  • Index Cond: (id = pp.id)
  • Heap Fetches: 21
329. 2.014 2.014 ↓ 1.0 23 1,007

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

330. 0.302 3,046.526 ↓ 1.0 1,908 1

Hash (cost=1,595,412.95..1,595,412.95 rows=1,907 width=17) (actual time=3,046.526..3,046.526 rows=1,908 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 105kB
331. 0.201 3,046.224 ↓ 1.0 1,908 1

Subquery Scan on percentual_cadastro_quitacao_precatorio (cost=1,595,222.25..1,595,412.95 rows=1,907 width=17) (actual time=3,042.186..3,046.224 rows=1,908 loops=1)

332. 3.520 3,046.023 ↓ 1.0 1,908 1

GroupAggregate (cost=1,595,222.25..1,595,393.88 rows=1,907 width=28) (actual time=3,042.184..3,046.023 rows=1,908 loops=1)

333. 2.563 3,042.503 ↓ 4.0 7,550 1

Sort (cost=1,595,222.25..1,595,227.02 rows=1,907 width=28) (actual time=3,042.162..3,042.503 rows=7,550 loops=1)

  • Sort Key: prec_1.id, pp_2.precatorio_id
  • Sort Method: quicksort Memory: 782kB
334. 2.576 3,039.940 ↓ 4.0 7,550 1

Merge Right Join (cost=1,594,743.99..1,595,118.34 rows=1,907 width=28) (actual time=3,017.873..3,039.940 rows=7,550 loops=1)

  • Merge Cond: (pp_2.precatorio_id = prec_1.id)
335. 3.794 3,036.316 ↓ 8.0 7,524 1

Nested Loop (cost=1,594,743.72..1,595,040.93 rows=941 width=20) (actual time=3,017.853..3,036.316 rows=7,524 loops=1)

336. 6.638 3,024.998 ↓ 8.0 7,524 1

GroupAggregate (cost=1,594,743.57..1,594,814.14 rows=941 width=217) (actual time=3,017.837..3,024.998 rows=7,524 loops=1)

337. 5.645 3,018.360 ↓ 8.1 7,583 1

Sort (cost=1,594,743.57..1,594,745.92 rows=941 width=217) (actual time=3,017.820..3,018.360 rows=7,583 loops=1)

  • Sort Key: pp_2.precatorio_id, pp_2.id, pprin.numero_processo, part.nome, tpapel.descricao, ult_ev_part.saldo_evento, pp_2.credor, cat_prec.descricao, rpvs_2.id, rpvs_2.data_limite_pagamento, ult_ev_part.evento_financeiros_id, ult_ev_part.data_evento, rpvs_2.num_oficio_requisitorio, rpvs_2.valor_requisitorio, pp_2.tipo_papel_id, pp_2.categoria_precatorio_id, prec_2.processo_principal_id, pp_2.participante_id, ult_ev_part.credor_quitado, prim_ev.precatorio_participantes_id, tp_sit_pgto_em_pgto.id, tp_sit_pgto_quitado.id, tp_sit_pgto_sem_lancamentos.id
  • Sort Method: quicksort Memory: 2272kB
338. 2.387 3,012.715 ↓ 8.1 7,583 1

Merge Semi Join (cost=1,585,934.50..1,594,697.09 rows=941 width=217) (actual time=3,008.754..3,012.715 rows=7,583 loops=1)

  • Merge Cond: (tp_sit_pgto_quitado.id = ($29))
339. 5.068 3,010.308 ↑ 24.8 22,749 1

Nested Loop (cost=1,585,933.92..1,593,271.65 rows=564,300 width=217) (actual time=2,993.809..3,010.308 rows=22,749 loops=1)

340. 0.059 0.059 ↑ 100.0 3 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_quitado (cost=0.15..57.15 rows=300 width=8) (actual time=0.050..0.059 rows=3 loops=1)

  • Filter: ativo
341. 3.438 3,005.181 ↓ 4.0 7,583 3

Materialize (cost=1,585,933.77..1,586,165.45 rows=1,881 width=209) (actual time=997.919..1,001.727 rows=7,583 loops=3)

342. 1.405 3,001.743 ↓ 4.0 7,583 1

Hash Left Join (cost=1,585,933.77..1,586,156.05 rows=1,881 width=209) (actual time=2,993.751..3,001.743 rows=7,583 loops=1)

  • Hash Cond: (pp_2.id = pevr_pagamentos.precatorio_participantes_id)
343. 1.305 2,994.709 ↓ 1.0 7,524 1

Merge Left Join (cost=1,584,915.40..1,585,082.55 rows=7,522 width=201) (actual time=2,988.107..2,994.709 rows=7,524 loops=1)

  • Merge Cond: (pp_2.id = prim_ev.precatorio_participantes_id)
344. 2.487 1,520.729 ↓ 1.0 7,524 1

Nested Loop (cost=793,229.11..793,377.16 rows=7,522 width=193) (actual time=1,515.462..1,520.729 rows=7,524 loops=1)

345. 2.247 1,518.242 ↓ 1.0 7,524 1

Merge Left Join (cost=793,227.72..793,265.63 rows=7,522 width=177) (actual time=1,515.432..1,518.242 rows=7,524 loops=1)

  • Merge Cond: (pp_2.id = ult_ev_part.precatorio_participantes_id)
346. 4.522 23.296 ↓ 1.0 7,524 1

Sort (cost=1,541.44..1,560.24 rows=7,522 width=156) (actual time=22.789..23.296 rows=7,524 loops=1)

  • Sort Key: pp_2.id
  • Sort Method: quicksort Memory: 2068kB
347. 2.540 18.774 ↓ 1.0 7,524 1

Hash Left Join (cost=402.89..1,057.13 rows=7,522 width=156) (actual time=4.135..18.774 rows=7,524 loops=1)

  • Hash Cond: (pp_2.rpv_id = rpvs_2.id)
348. 1.538 15.356 ↓ 1.0 7,524 1

Hash Left Join (cost=324.78..915.66 rows=7,522 width=140) (actual time=3.216..15.356 rows=7,524 loops=1)

  • Hash Cond: (pp_2.categoria_precatorio_id = cat_prec.id)
349. 1.921 13.814 ↓ 1.0 7,524 1

Hash Left Join (cost=323.74..856.45 rows=7,522 width=118) (actual time=3.201..13.814 rows=7,524 loops=1)

  • Hash Cond: (pp_2.tipo_papel_id = tpapel.id)
350. 3.303 11.886 ↓ 1.0 7,524 1

Hash Join (cost=322.60..751.88 rows=7,522 width=110) (actual time=3.183..11.886 rows=7,524 loops=1)

  • Hash Cond: (pp_2.participante_id = part.id)
351. 2.617 7.544 ↓ 1.0 7,524 1

Hash Join (cost=192.93..499.98 rows=7,522 width=82) (actual time=2.132..7.544 rows=7,524 loops=1)

  • Hash Cond: (pp_2.precatorio_id = prec_2.id)
352. 2.809 2.809 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes pp_2 (cost=0.00..194.22 rows=7,522 width=49) (actual time=0.003..2.809 rows=7,524 loops=1)

353. 0.441 2.118 ↓ 1.0 1,908 1

Hash (cost=169.09..169.09 rows=1,907 width=41) (actual time=2.118..2.118 rows=1,908 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 138kB
354. 0.629 1.677 ↓ 1.0 1,908 1

Hash Join (cost=78.42..169.09 rows=1,907 width=41) (actual time=0.730..1.677 rows=1,908 loops=1)

  • Hash Cond: (prec_2.processo_principal_id = pprin.id)
355. 0.330 0.330 ↓ 1.0 1,908 1

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

356. 0.320 0.718 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
357. 0.398 0.398 ↓ 1.0 2,064 1

Seq Scan on processo_principais pprin (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.004..0.398 rows=2,064 loops=1)

358. 0.540 1.039 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 220kB
359. 0.499 0.499 ↓ 1.0 3,142 1

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

360. 0.002 0.007 ↑ 1.0 6 1

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

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

Seq Scan on tipo_papeis tpapel (cost=0.00..1.06 rows=6 width=16) (actual time=0.003..0.005 rows=6 loops=1)

362. 0.001 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=30) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
363. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on categoria_precatorios cat_prec (cost=0.00..1.02 rows=2 width=30) (actual time=0.002..0.003 rows=2 loops=1)

364. 0.403 0.878 ↓ 1.0 2,140 1

Hash (cost=51.38..51.38 rows=2,138 width=24) (actual time=0.878..0.878 rows=2,140 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 119kB
365. 0.475 0.475 ↓ 1.0 2,140 1

Seq Scan on rpvs rpvs_2 (cost=0.00..51.38 rows=2,138 width=24) (actual time=0.004..0.475 rows=2,140 loops=1)

366. 0.203 1,492.699 ↓ 29.8 596 1

Sort (cost=791,686.29..791,686.34 rows=20 width=29) (actual time=1,492.634..1,492.699 rows=596 loops=1)

  • Sort Key: ult_ev_part.precatorio_participantes_id
  • Sort Method: quicksort Memory: 71kB
367. 0.122 1,492.496 ↓ 29.8 596 1

Subquery Scan on ult_ev_part (cost=791,685.61..791,685.86 rows=20 width=29) (actual time=1,492.329..1,492.496 rows=596 loops=1)

368. 3.574 1,492.374 ↓ 29.8 596 1

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

  • Sort Key: tab1_1.numero_processo_principal, tab1_1.participantes_nome
  • Sort Method: quicksort Memory: 183kB
369. 3.036 1,488.800 ↓ 29.8 596 1

Subquery Scan on tab1_1 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=104.149..1,488.800 rows=596 loops=1)

  • Filter: (tab1_1.data_evento_id = (SubPlan 5))
  • Rows Removed by Filter: 638
370. 2.932 102.450 ↑ 3.2 1,234 1

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

371. 31.501 99.518 ↑ 1.0 3,944 1

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

  • 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: 1144kB
372. 1.749 68.017 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_2 (cost=1,374.15..1,423.45 rows=3,944 width=151) (actual time=65.718..68.017 rows=3,944 loops=1)

373. 43.564 66.268 ↑ 1.0 3,944 1

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

  • Sort Key: precatorios_8.id, participantes_6.nome, tipo_papeis_3.descricao, evento_financeiros_3.data_evento, evento_financeiros_3.id, configuracao_rubrica_precatorios_2.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
374. 6.898 22.704 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_8.processo_principal_id = processo_principais_5.id)
375. 2.397 15.090 ↑ 1.0 3,944 1

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

  • Hash Cond: ((configuracao_rubrica_precatorios_2.precatorio_id = precatorios_8.id) AND (configuracao_rubrica_precatorios_2.tipo_rubrica_id = tipo_rubricas_2.id))
376. 0.108 0.108 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_2 (cost=0.00..15.93 rows=793 width=12) (actual time=0.003..0.108 rows=793 loops=1)

377. 2.001 12.585 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
378. 1.222 10.584 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_2.tipo_rubrica_id = tipo_rubricas_2.id)
379. 2.010 9.347 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_2.evento_financeiro_id = evento_financeiros_3.id)
380. 0.398 0.398 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_2 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.003..0.398 rows=3,944 loops=1)

381. 0.610 6.939 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
382. 0.442 6.329 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_7.tipo_papel_id = tipo_papeis_3.id)
383. 0.461 5.882 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_7.participante_id = participantes_6.id)
384. 0.374 4.500 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_7.precatorio_id = precatorios_8.id)
385. 0.313 3.303 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros_3.tipo_evento_financeiro_id = tipo_evento_financeiros_3.id)
386. 0.951 2.982 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_7.id = evento_financeiros_3.precatorio_participante_id)
387. 1.366 1.366 ↓ 1.0 7,524 1

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

388. 0.330 0.665 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
389. 0.335 0.335 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_3 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.003..0.335 rows=1,234 loops=1)

390. 0.002 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
391. 0.006 0.006 ↑ 1.0 9 1

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

392. 0.369 0.823 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
393. 0.454 0.454 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_8 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.005..0.454 rows=1,908 loops=1)

394. 0.492 0.921 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
395. 0.429 0.429 ↓ 1.0 3,142 1

Seq Scan on participantes participantes_6 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.003..0.429 rows=3,142 loops=1)

396. 0.002 0.005 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
397. 0.003 0.003 ↑ 1.0 6 1

Seq Scan on tipo_papeis tipo_papeis_3 (cost=0.00..1.06 rows=6 width=16) (actual time=0.002..0.003 rows=6 loops=1)

398. 0.004 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
399. 0.011 0.011 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_2 (cost=0.00..1.35 rows=35 width=31) (actual time=0.003..0.011 rows=35 loops=1)

400. 0.363 0.716 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
401. 0.353 0.353 ↓ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_5 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.010..0.353 rows=2,064 loops=1)

402.          

SubPlan (for Subquery Scan)

403. 2.468 1,383.314 ↑ 1.0 1 1,234

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

404. 7.404 1,380.846 ↑ 1.5 2 1,234

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

405. 77.742 1,373.442 ↓ 2.3 7 1,234

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

  • 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
406. 3.702 1,295.700 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_9 (cost=200.00..200.04 rows=3 width=151) (actual time=1.047..1.050 rows=7 loops=1,234)

407. 88.848 1,291.998 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_17.id, participantes_15.nome, tipo_papeis_12.descricao, evento_financeiros_12.data_evento, evento_financeiros_12.id, configuracao_rubrica_precatorios_11.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
408. 30.436 1,203.150 ↓ 2.3 7 1,234

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

409. 119.698 1,156.258 ↓ 2.3 7 1,234

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

  • Hash Cond: ((configuracao_rubrica_precatorios_11.precatorio_id = precatorios_17.id) AND (configuracao_rubrica_precatorios_11.tipo_rubrica_id = tipo_rubricas_11.id))
410. 61.700 61.700 ↑ 1.0 793 1,234

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

411. 6.170 974.860 ↓ 2.3 7 1,234

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

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

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

413. 2.468 950.180 ↓ 2.3 7 1,234

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

414. 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_16.tipo_papel_id = tipo_papeis_12.id)
  • Rows Removed by Join Filter: 5
415. 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)

416. 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)

417. 6.170 6.170 ↑ 1.0 1 1,234

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

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

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

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

Index Scan using participantes_pkey on participantes participantes_15 (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_16.participante_id)
420. 1.234 1.234 ↑ 1.0 6 1,234

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

421. 12.340 925.500 ↓ 2.3 7 1,234

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

  • Join Filter: (evento_financeiros_12.tipo_evento_financeiro_id = tipo_evento_financeiros_12.id)
  • Rows Removed by Join Filter: 21
422. 443.006 913.160 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_11.evento_financeiro_id = evento_financeiros_12.id)
423. 324.542 324.542 ↑ 1.0 3,944 1,234

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

424. 2.468 145.612 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
425. 143.144 143.144 ↑ 1.0 2 1,234

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

  • Filter: (precatorio_participante_id = tab1_1.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
426. 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)

427. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_12 (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
428. 8.228 8.228 ↑ 1.0 1 8,228

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_11 (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_11.tipo_rubrica_id)
429. 16.456 16.456 ↑ 1.0 1 8,228

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

  • Index Cond: (id = precatorios_17.processo_principal_id)
430. 0.000 0.000 ↑ 1.0 1 7,524

Materialize (cost=1.38..17.50 rows=1 width=16) (actual time=0.000..0.000 rows=1 loops=7,524)

431. 0.002 0.031 ↑ 1.0 1 1

Nested Loop (cost=1.38..17.49 rows=1 width=16) (actual time=0.027..0.031 rows=1 loops=1)

432. 0.001 0.026 ↑ 1.0 1 1

Nested Loop (cost=1.23..9.31 rows=1 width=16) (actual time=0.023..0.026 rows=1 loops=1)

433. 0.006 0.020 ↑ 1.0 1 1

Nested Loop (cost=0.69..8.74 rows=1 width=8) (actual time=0.018..0.020 rows=1 loops=1)

434. 0.002 0.011 ↑ 1.0 1 1

Result (cost=0.54..0.55 rows=1 width=0) (actual time=0.011..0.011 rows=1 loops=1)

435.          

Initplan (for Result)

436. 0.001 0.009 ↑ 1.0 1 1

Limit (cost=0.15..0.54 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

437. 0.008 0.008 ↑ 149.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos (cost=0.15..58.60 rows=149 width=8) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Filter: (ativo AND indica_sem_lancamentos)
438. 0.003 0.003 ↑ 1.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_sem_lancamentos (cost=0.15..8.17 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (id = ($27))
  • Filter: ativo
439. 0.002 0.005 ↑ 1.0 1 1

Result (cost=0.54..0.55 rows=1 width=0) (actual time=0.005..0.005 rows=1 loops=1)

440.          

Initplan (for Result)

441. 0.000 0.003 ↑ 1.0 1 1

Limit (cost=0.15..0.54 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

442. 0.003 0.003 ↑ 149.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tipo_situacao_pagamentos_1 (cost=0.15..58.60 rows=149 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Filter: (ativo AND indica_em_pagamento)
  • Rows Removed by Filter: 1
443. 0.003 0.003 ↑ 1.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_em_pgto (cost=0.15..8.17 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=1)

  • Index Cond: (id = ($28))
  • Filter: ativo
444. 0.149 1,472.675 ↓ 29.8 596 1

Sort (cost=791,686.29..791,686.34 rows=20 width=8) (actual time=1,472.640..1,472.675 rows=596 loops=1)

  • Sort Key: prim_ev.precatorio_participantes_id
  • Sort Method: quicksort Memory: 52kB
445. 0.096 1,472.526 ↓ 29.8 596 1

Subquery Scan on prim_ev (cost=791,685.61..791,685.86 rows=20 width=8) (actual time=1,472.399..1,472.526 rows=596 loops=1)

446. 3.387 1,472.430 ↓ 29.8 596 1

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

  • Sort Key: tab1_2.numero_processo_principal, tab1_2.participantes_nome
  • Sort Method: quicksort Memory: 183kB
447. 3.116 1,469.043 ↓ 29.8 596 1

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

  • Filter: (tab1_2.data_evento_id = (SubPlan 6))
  • Rows Removed by Filter: 638
448. 3.025 97.421 ↑ 3.2 1,234 1

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

449. 29.538 94.396 ↑ 1.0 3,944 1

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

  • 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: 1144kB
450. 1.465 64.858 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_3 (cost=1,374.15..1,423.45 rows=3,944 width=151) (actual time=62.998..64.858 rows=3,944 loops=1)

451. 42.840 63.393 ↑ 1.0 3,944 1

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

  • Sort Key: precatorios_9.id, participantes_7.nome, tipo_papeis_4.descricao, evento_financeiros_4.data_evento, evento_financeiros_4.id, configuracao_rubrica_precatorios_3.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
452. 6.611 20.553 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_9.processo_principal_id = processo_principais_6.id)
453. 2.113 13.281 ↑ 1.0 3,944 1

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

  • Hash Cond: ((configuracao_rubrica_precatorios_3.precatorio_id = precatorios_9.id) AND (configuracao_rubrica_precatorios_3.tipo_rubrica_id = tipo_rubricas_3.id))
454. 0.090 0.090 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_3 (cost=0.00..15.93 rows=793 width=12) (actual time=0.003..0.090 rows=793 loops=1)

455. 1.823 11.078 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
456. 1.137 9.255 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_3.tipo_rubrica_id = tipo_rubricas_3.id)
457. 1.778 8.104 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_3.evento_financeiro_id = evento_financeiros_4.id)
458. 0.346 0.346 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_3 (cost=0.00..100.44 rows=3,944 width=32) (actual time=0.002..0.346 rows=3,944 loops=1)

459. 0.456 5.980 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
460. 0.397 5.524 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_8.tipo_papel_id = tipo_papeis_4.id)
461. 0.403 5.123 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_8.participante_id = participantes_7.id)
462. 0.354 3.811 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_8.precatorio_id = precatorios_9.id)
463. 0.309 2.901 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros_4.tipo_evento_financeiro_id = tipo_evento_financeiros_4.id)
464. 0.894 2.583 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_8.id = evento_financeiros_4.precatorio_participante_id)
465. 1.243 1.243 ↓ 1.0 7,524 1

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

466. 0.221 0.446 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
467. 0.225 0.225 ↑ 1.0 1,234 1

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

468. 0.004 0.009 ↑ 1.0 9 1

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

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

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

470. 0.237 0.556 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
471. 0.319 0.319 ↓ 1.0 1,908 1

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

472. 0.448 0.909 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
473. 0.461 0.461 ↓ 1.0 3,142 1

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

474. 0.001 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
475. 0.003 0.003 ↑ 1.0 6 1

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

476. 0.006 0.014 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
477. 0.008 0.008 ↑ 1.0 35 1

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

478. 0.313 0.661 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
479. 0.348 0.348 ↓ 1.0 2,064 1

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

480.          

SubPlan (for Subquery Scan)

481. 2.468 1,368.506 ↑ 1.0 1 1,234

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

482. 7.404 1,366.038 ↑ 1.5 2 1,234

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

483. 76.508 1,358.634 ↓ 2.3 7 1,234

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

  • 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
484. 3.702 1,282.126 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_10 (cost=200.00..200.04 rows=3 width=151) (actual time=1.037..1.039 rows=7 loops=1,234)

485. 87.614 1,278.424 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_18.id, participantes_16.nome, tipo_papeis_13.descricao, evento_financeiros_13.data_evento, evento_financeiros_13.id, configuracao_rubrica_precatorios_12.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
486. 30.436 1,190.810 ↓ 2.3 7 1,234

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

487. 117.230 1,143.918 ↓ 2.3 7 1,234

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

  • Hash Cond: ((configuracao_rubrica_precatorios_12.precatorio_id = precatorios_18.id) AND (configuracao_rubrica_precatorios_12.tipo_rubrica_id = tipo_rubricas_12.id))
488. 61.700 61.700 ↑ 1.0 793 1,234

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

489. 6.170 964.988 ↓ 2.3 7 1,234

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

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

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

491. 2.468 940.308 ↓ 2.3 7 1,234

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

492. 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_17.tipo_papel_id = tipo_papeis_13.id)
  • Rows Removed by Join Filter: 5
493. 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)

494. 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)

495. 6.170 6.170 ↑ 1.0 1 1,234

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_17 (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)
496. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using precatorios_pkey on precatorios precatorios_18 (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_17.precatorio_id)
497. 3.702 3.702 ↑ 1.0 1 1,234

Index Scan using participantes_pkey on participantes participantes_16 (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_17.participante_id)
498. 1.234 1.234 ↑ 1.0 6 1,234

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

499. 12.340 915.628 ↓ 2.3 7 1,234

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

  • Join Filter: (evento_financeiros_13.tipo_evento_financeiro_id = tipo_evento_financeiros_13.id)
  • Rows Removed by Join Filter: 21
500. 439.304 903.288 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_12.evento_financeiro_id = evento_financeiros_13.id)
501. 319.606 319.606 ↑ 1.0 3,944 1,234

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

502. 2.468 144.378 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
503. 141.910 141.910 ↑ 1.0 2 1,234

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

  • Filter: (precatorio_participante_id = tab1_2.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
504. 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)

505. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_13 (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
506. 8.228 8.228 ↑ 1.0 1 8,228

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_12 (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_12.tipo_rubrica_id)
507. 16.456 16.456 ↑ 1.0 1 8,228

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

  • Index Cond: (id = precatorios_18.processo_principal_id)
508. 0.011 5.629 ↑ 22.2 79 1

Hash (cost=996.49..996.49 rows=1,751 width=16) (actual time=5.629..5.629 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
509. 0.020 5.618 ↑ 22.2 79 1

Subquery Scan on pevr_pagamentos (cost=974.60..996.49 rows=1,751 width=16) (actual time=5.595..5.618 rows=79 loops=1)

510. 0.631 5.598 ↑ 22.2 79 1

Sort (cost=974.60..978.98 rows=1,751 width=212) (actual time=5.594..5.598 rows=79 loops=1)

  • Sort Key: precatorios_10.id, participantes_8.nome, tipo_papeis_5.descricao, evento_financeiros_5.data_evento, evento_financeiros_5.id, configuracao_rubrica_precatorios_4.ordem_apresentacao
  • Sort Method: quicksort Memory: 65kB
511. 0.352 4.967 ↑ 22.2 79 1

Hash Join (cost=764.80..880.27 rows=1,751 width=212) (actual time=4.503..4.967 rows=79 loops=1)

  • Hash Cond: (processo_principais_7.id = precatorios_10.processo_principal_id)
512. 0.137 0.137 ↓ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_7 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.004..0.137 rows=2,064 loops=1)

513. 0.047 4.478 ↑ 22.2 79 1

Hash (cost=742.91..742.91 rows=1,751 width=195) (actual time=4.478..4.478 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
514. 0.129 4.431 ↑ 22.2 79 1

Hash Right Join (cost=718.84..742.91 rows=1,751 width=195) (actual time=4.260..4.431 rows=79 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios_4.precatorio_id = precatorios_10.id) AND (configuracao_rubrica_precatorios_4.tipo_rubrica_id = tipo_rubricas_4.id))
515. 0.054 0.054 ↑ 1.0 793 1

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

516. 0.045 4.248 ↑ 22.2 79 1

Hash (cost=692.58..692.58 rows=1,751 width=191) (actual time=4.248..4.248 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
517. 0.032 4.203 ↑ 22.2 79 1

Hash Join (cost=535.76..692.58 rows=1,751 width=191) (actual time=3.558..4.203 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_4.tipo_rubrica_id = tipo_rubricas_4.id)
518. 0.374 4.156 ↑ 22.2 79 1

Hash Join (cost=533.97..666.71 rows=1,751 width=168) (actual time=3.536..4.156 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_4.evento_financeiro_id = evento_financeiros_5.id)
519. 0.256 0.256 ↑ 1.0 3,944 1

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

520. 0.016 3.526 ↑ 27.4 20 1

Hash (cost=527.12..527.12 rows=548 width=144) (actual time=3.526..3.526 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
521. 0.010 3.510 ↑ 27.4 20 1

Hash Join (cost=265.15..527.12 rows=548 width=144) (actual time=1.862..3.510 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.tipo_papel_id = tipo_papeis_5.id)
522. 0.015 3.496 ↑ 27.4 20 1

Hash Join (cost=264.02..518.45 rows=548 width=136) (actual time=1.852..3.496 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.participante_id = participantes_8.id)
523. 0.019 2.585 ↑ 27.4 20 1

Hash Join (cost=134.34..379.88 rows=548 width=108) (actual time=0.949..2.585 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.precatorio_id = precatorios_10.id)
524. 0.519 1.961 ↑ 27.4 20 1

Hash Join (cost=48.44..285.75 rows=548 width=100) (actual time=0.328..1.961 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.id = evento_financeiros_5.precatorio_participante_id)
525. 1.133 1.133 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_9 (cost=0.00..194.22 rows=7,522 width=48) (actual time=0.002..1.133 rows=7,524 loops=1)

526. 0.005 0.309 ↑ 27.4 20 1

Hash (cost=41.59..41.59 rows=548 width=60) (actual time=0.309..0.309 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
527. 0.107 0.304 ↑ 27.4 20 1

Hash Join (cost=1.14..41.59 rows=548 width=60) (actual time=0.025..0.304 rows=20 loops=1)

  • Hash Cond: (evento_financeiros_5.tipo_evento_financeiro_id = tipo_evento_financeiros_5.id)
528. 0.188 0.188 ↑ 1.0 1,234 1

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

529. 0.001 0.009 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=31) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
530. 0.008 0.008 ↑ 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.005..0.008 rows=4 loops=1)

  • Filter: pagamento
  • Rows Removed by Filter: 5
531. 0.248 0.605 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
532. 0.357 0.357 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_10 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.357 rows=1,908 loops=1)

533. 0.442 0.896 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
534. 0.454 0.454 ↓ 1.0 3,142 1

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

535. 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
536. 0.002 0.002 ↑ 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.002 rows=6 loops=1)

537. 0.008 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
538. 0.007 0.007 ↑ 1.0 35 1

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

539. 0.002 0.020 ↑ 1.0 1 1

Materialize (cost=0.57..0.58 rows=1 width=8) (actual time=0.020..0.020 rows=1 loops=1)

540. 0.004 0.018 ↑ 1.0 1 1

Sort (cost=0.57..0.58 rows=1 width=8) (actual time=0.018..0.018 rows=1 loops=1)

  • Sort Key: ($29)
  • Sort Method: quicksort Memory: 25kB
541. 0.003 0.014 ↑ 1.0 1 1

Result (cost=0.54..0.55 rows=1 width=0) (actual time=0.014..0.014 rows=1 loops=1)

542.          

Initplan (for Result)

543. 0.001 0.011 ↑ 1.0 1 1

Limit (cost=0.15..0.54 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=1)

544. 0.010 0.010 ↑ 149.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tipo_situacao_pagamentos_2 (cost=0.15..58.60 rows=149 width=8) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Filter: (ativo AND indica_quitacao)
  • Rows Removed by Filter: 2
545. 7.524 7.524 ↑ 1.0 1 7,524

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit (cost=0.15..0.22 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=7,524)

  • Index Cond: (id = (CASE WHEN ult_ev_part.credor_quitado THEN tp_sit_pgto_quitado.id WHEN ((prim_ev.precatorio_participantes_id IS NOT NULL) AND (NOT ult_ev_part.credor_quitado)) THEN tp_sit_pgto_em_pgto.id ELSE tp_sit_pgto_sem_lancamentos.id END))
546. 1.048 1.048 ↓ 4.0 7,549 1

Index Only Scan using precatorios_pkey on precatorios prec_1 (cost=0.28..60.88 rows=1,907 width=8) (actual time=0.016..1.048 rows=7,549 loops=1)

  • Heap Fetches: 491
547. 0.208 3,231.238 ↓ 1.9 1,304 1

Hash (cost=1,590,646.34..1,590,646.34 rows=700 width=8) (actual time=3,231.238..3,231.238 rows=1,304 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
548. 0.149 3,231.030 ↓ 1.9 1,304 1

Subquery Scan on precatorios_atrasados_nao_quitados (cost=1,590,570.30..1,590,646.34 rows=700 width=8) (actual time=3,220.042..3,231.030 rows=1,304 loops=1)

549. 1.483 3,230.881 ↓ 1.9 1,304 1

GroupAggregate (cost=1,590,570.30..1,590,639.34 rows=700 width=12) (actual time=3,220.042..3,230.881 rows=1,304 loops=1)

550. 2.732 3,229.398 ↓ 18.9 13,231 1

Merge Join (cost=1,590,570.30..1,590,628.84 rows=700 width=12) (actual time=3,220.029..3,229.398 rows=13,231 loops=1)

  • Merge Cond: (pp_3.precatorio_id = rpvs_3.precatorio_id)
551. 5.426 3,224.863 ↓ 15.5 7,304 1

GroupAggregate (cost=1,590,394.53..1,590,429.86 rows=471 width=217) (actual time=3,218.979..3,224.863 rows=7,304 loops=1)

552. 5.915 3,219.437 ↓ 15.5 7,306 1

Sort (cost=1,590,394.53..1,590,395.71 rows=471 width=217) (actual time=3,218.965..3,219.437 rows=7,306 loops=1)

  • Sort Key: pp_3.precatorio_id, pp_3.id, pprin_1.numero_processo, part_1.nome, tpapel_1.descricao, ult_ev_part_1.saldo_evento, pp_3.credor, cat_prec_1.descricao, rpvs_4.id, rpvs_4.data_limite_pagamento, ult_ev_part_1.evento_financeiros_id, ult_ev_part_1.data_evento, rpvs_4.num_oficio_requisitorio, rpvs_4.valor_requisitorio, pp_3.tipo_papel_id, pp_3.categoria_precatorio_id, prec_3.processo_principal_id, pp_3.participante_id, ult_ev_part_1.credor_quitado, prim_ev_1.precatorio_participantes_id, tp_sit_pgto_em_pgto_1.id, tp_sit_pgto_quitado_1.id, tp_sit_pgto_sem_lancamentos_1.id
  • Sort Method: quicksort Memory: 2243kB
553. 2.896 3,213.522 ↓ 15.9 7,506 1

Merge Semi Join (cost=1,585,934.50..1,590,373.62 rows=471 width=217) (actual time=3,208.382..3,213.522 rows=7,506 loops=1)

  • Merge Cond: (tp_sit_pgto_quitado_1.id = ($45))
554. 5.874 3,210.600 ↑ 12.5 22,518 1

Nested Loop (cost=1,585,933.92..1,589,660.23 rows=282,300 width=217) (actual time=3,192.409..3,210.600 rows=22,518 loops=1)

555. 0.024 0.024 ↑ 100.0 3 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_quitado_1 (cost=0.15..57.15 rows=300 width=8) (actual time=0.006..0.024 rows=3 loops=1)

  • Filter: ativo
556. 3.794 3,204.702 ↓ 8.0 7,506 3

Materialize (cost=1,585,933.77..1,586,076.68 rows=941 width=209) (actual time=1,064.134..1,068.234 rows=7,506 loops=3)

557. 1.428 3,200.908 ↓ 8.0 7,506 1

Hash Left Join (cost=1,585,933.77..1,586,071.98 rows=941 width=209) (actual time=3,192.389..3,200.908 rows=7,506 loops=1)

  • Hash Cond: (pp_3.id = pevr_pagamentos_1.precatorio_participantes_id)
558. 1.396 3,193.610 ↓ 2.0 7,505 1

Merge Left Join (cost=1,584,915.40..1,585,026.04 rows=3,761 width=201) (actual time=3,186.489..3,193.610 rows=7,505 loops=1)

  • Merge Cond: (pp_3.id = prim_ev_1.precatorio_participantes_id)
559. 2.573 1,633.102 ↓ 2.0 7,505 1

Nested Loop (cost=793,229.11..793,330.14 rows=3,761 width=193) (actual time=1,627.427..1,633.102 rows=7,505 loops=1)

560. 2.488 1,630.529 ↓ 2.0 7,505 1

Merge Left Join (cost=793,227.72..793,265.63 rows=3,761 width=177) (actual time=1,627.396..1,630.529 rows=7,505 loops=1)

  • Merge Cond: (pp_3.id = ult_ev_part_1.precatorio_participantes_id)
  • Filter: (NOT CASE WHEN ult_ev_part_1.credor_quitado THEN true ELSE false END)
  • Rows Removed by Filter: 19
561. 4.251 19.980 ↓ 1.0 7,524 1

Sort (cost=1,541.44..1,560.24 rows=7,522 width=156) (actual time=19.383..19.980 rows=7,524 loops=1)

  • Sort Key: pp_3.id
  • Sort Method: quicksort Memory: 2068kB
562. 1.886 15.729 ↓ 1.0 7,524 1

Hash Left Join (cost=402.89..1,057.13 rows=7,522 width=156) (actual time=4.093..15.729 rows=7,524 loops=1)

  • Hash Cond: (pp_3.rpv_id = rpvs_4.id)
563. 1.381 13.040 ↓ 1.0 7,524 1

Hash Left Join (cost=324.78..915.66 rows=7,522 width=140) (actual time=3.275..13.040 rows=7,524 loops=1)

  • Hash Cond: (pp_3.categoria_precatorio_id = cat_prec_1.id)
564. 1.771 11.655 ↓ 1.0 7,524 1

Hash Left Join (cost=323.74..856.45 rows=7,522 width=118) (actual time=3.261..11.655 rows=7,524 loops=1)

  • Hash Cond: (pp_3.tipo_papel_id = tpapel_1.id)
565. 2.269 9.878 ↓ 1.0 7,524 1

Hash Join (cost=322.60..751.88 rows=7,522 width=110) (actual time=3.241..9.878 rows=7,524 loops=1)

  • Hash Cond: (pp_3.participante_id = part_1.id)
566. 2.158 6.500 ↓ 1.0 7,524 1

Hash Join (cost=192.93..499.98 rows=7,522 width=82) (actual time=2.118..6.500 rows=7,524 loops=1)

  • Hash Cond: (pp_3.precatorio_id = prec_3.id)
567. 2.241 2.241 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes pp_3 (cost=0.00..194.22 rows=7,522 width=49) (actual time=0.002..2.241 rows=7,524 loops=1)

568. 0.407 2.101 ↓ 1.0 1,908 1

Hash (cost=169.09..169.09 rows=1,907 width=41) (actual time=2.101..2.101 rows=1,908 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 138kB
569. 0.547 1.694 ↓ 1.0 1,908 1

Hash Join (cost=78.42..169.09 rows=1,907 width=41) (actual time=0.765..1.694 rows=1,908 loops=1)

  • Hash Cond: (prec_3.processo_principal_id = pprin_1.id)
570. 0.401 0.401 ↓ 1.0 1,908 1

Seq Scan on precatorios prec_3 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.401 rows=1,908 loops=1)

571. 0.453 0.746 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
572. 0.293 0.293 ↓ 1.0 2,064 1

Seq Scan on processo_principais pprin_1 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.008..0.293 rows=2,064 loops=1)

573. 0.638 1.109 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 220kB
574. 0.471 0.471 ↓ 1.0 3,142 1

Seq Scan on participantes part_1 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.005..0.471 rows=3,142 loops=1)

575. 0.001 0.006 ↑ 1.0 6 1

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

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

Seq Scan on tipo_papeis tpapel_1 (cost=0.00..1.06 rows=6 width=16) (actual time=0.003..0.005 rows=6 loops=1)

577. 0.001 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=30) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
578. 0.003 0.003 ↑ 1.0 2 1

Seq Scan on categoria_precatorios cat_prec_1 (cost=0.00..1.02 rows=2 width=30) (actual time=0.003..0.003 rows=2 loops=1)

579. 0.403 0.803 ↓ 1.0 2,140 1

Hash (cost=51.38..51.38 rows=2,138 width=24) (actual time=0.803..0.803 rows=2,140 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 119kB
580. 0.400 0.400 ↓ 1.0 2,140 1

Seq Scan on rpvs rpvs_4 (cost=0.00..51.38 rows=2,138 width=24) (actual time=0.003..0.400 rows=2,140 loops=1)

581. 0.208 1,608.061 ↓ 29.8 596 1

Sort (cost=791,686.29..791,686.34 rows=20 width=29) (actual time=1,608.003..1,608.061 rows=596 loops=1)

  • Sort Key: ult_ev_part_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 71kB
582. 0.136 1,607.853 ↓ 29.8 596 1

Subquery Scan on ult_ev_part_1 (cost=791,685.61..791,685.86 rows=20 width=29) (actual time=1,607.683..1,607.853 rows=596 loops=1)

583. 3.543 1,607.717 ↓ 29.8 596 1

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

  • Sort Key: tab1_3.numero_processo_principal, tab1_3.participantes_nome
  • Sort Method: quicksort Memory: 183kB
584. 2.891 1,604.174 ↓ 29.8 596 1

Subquery Scan on tab1_3 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=101.788..1,604.174 rows=596 loops=1)

  • Filter: (tab1_3.data_evento_id = (SubPlan 10))
  • Rows Removed by Filter: 638
585. 3.339 100.739 ↑ 3.2 1,234 1

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

586. 29.723 97.400 ↑ 1.0 3,944 1

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

  • 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: 1144kB
587. 1.394 67.677 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_4 (cost=1,374.15..1,423.45 rows=3,944 width=151) (actual time=65.895..67.677 rows=3,944 loops=1)

588. 43.567 66.283 ↑ 1.0 3,944 1

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

  • Sort Key: precatorios_11.id, participantes_9.nome, tipo_papeis_6.descricao, evento_financeiros_6.data_evento, evento_financeiros_6.id, configuracao_rubrica_precatorios_5.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
589. 7.061 22.716 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_11.processo_principal_id = processo_principais_8.id)
590. 2.183 14.869 ↑ 1.0 3,944 1

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

  • Hash Cond: ((configuracao_rubrica_precatorios_5.precatorio_id = precatorios_11.id) AND (configuracao_rubrica_precatorios_5.tipo_rubrica_id = tipo_rubricas_5.id))
591. 0.112 0.112 ↑ 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.112 rows=793 loops=1)

592. 2.120 12.574 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
593. 1.209 10.454 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_5.tipo_rubrica_id = tipo_rubricas_5.id)
594. 1.910 9.227 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_5.evento_financeiro_id = evento_financeiros_6.id)
595. 0.408 0.408 ↑ 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.002..0.408 rows=3,944 loops=1)

596. 0.671 6.909 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
597. 0.502 6.238 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.tipo_papel_id = tipo_papeis_6.id)
598. 0.423 5.728 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.participante_id = participantes_9.id)
599. 0.363 4.223 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.precatorio_id = precatorios_11.id)
600. 0.404 3.236 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros_6.tipo_evento_financeiro_id = tipo_evento_financeiros_6.id)
601. 1.050 2.824 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.id = evento_financeiros_6.precatorio_participante_id)
602. 1.311 1.311 ↓ 1.0 7,524 1

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

603. 0.199 0.463 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
604. 0.264 0.264 ↑ 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.264 rows=1,234 loops=1)

605. 0.003 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
606. 0.005 0.005 ↑ 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.003..0.005 rows=9 loops=1)

607. 0.269 0.624 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
608. 0.355 0.355 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_11 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.355 rows=1,908 loops=1)

609. 0.575 1.082 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
610. 0.507 0.507 ↓ 1.0 3,142 1

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

611. 0.002 0.008 ↑ 1.0 6 1

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

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

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

613. 0.010 0.018 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
614. 0.008 0.008 ↑ 1.0 35 1

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

615. 0.424 0.786 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
616. 0.362 0.362 ↓ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_8 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.007..0.362 rows=2,064 loops=1)

617.          

SubPlan (for Subquery Scan)

618. 2.468 1,500.544 ↑ 1.0 1 1,234

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

619. 8.638 1,498.076 ↑ 1.5 2 1,234

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

620. 83.912 1,489.438 ↓ 2.3 7 1,234

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

  • 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
621. 3.702 1,405.526 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_11 (cost=200.00..200.04 rows=3 width=151) (actual time=1.137..1.139 rows=7 loops=1,234)

622. 93.784 1,401.824 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_19.id, participantes_17.nome, tipo_papeis_14.descricao, evento_financeiros_14.data_evento, evento_financeiros_14.id, configuracao_rubrica_precatorios_13.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
623. 36.606 1,308.040 ↓ 2.3 7 1,234

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

624. 127.102 1,254.978 ↓ 2.3 7 1,234

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

  • Hash Cond: ((configuracao_rubrica_precatorios_13.precatorio_id = precatorios_19.id) AND (configuracao_rubrica_precatorios_13.tipo_rubrica_id = tipo_rubricas_13.id))
625. 70.338 70.338 ↑ 1.0 793 1,234

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

626. 7.404 1,057.538 ↓ 2.3 7 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
627. 4.522 1,050.134 ↓ 2.3 7 1,234

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

628. 1.234 1,029.156 ↓ 2.3 7 1,234

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

629. 4.936 25.914 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_18.tipo_papel_id = tipo_papeis_14.id)
  • Rows Removed by Join Filter: 5
630. 2.468 19.744 ↑ 1.0 1 1,234

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

631. 1.234 13.574 ↑ 1.0 1 1,234

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

632. 7.404 7.404 ↑ 1.0 1 1,234

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

  • Index Cond: (id = tab1_3.precatorio_participantes_id)
633. 4.936 4.936 ↑ 1.0 1 1,234

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

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

Index Scan using participantes_pkey on participantes participantes_17 (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_18.participante_id)
635. 1.234 1.234 ↑ 1.0 6 1,234

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=1,234)

636. 13.574 1,002.008 ↓ 2.3 7 1,234

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

  • Join Filter: (evento_financeiros_14.tipo_evento_financeiro_id = tipo_evento_financeiros_14.id)
  • Rows Removed by Join Filter: 21
637. 480.026 988.434 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_13.evento_financeiro_id = evento_financeiros_14.id)
638. 349.222 349.222 ↑ 1.0 3,944 1,234

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

639. 2.468 159.186 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
640. 156.718 156.718 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_14 (cost=0.00..33.42 rows=2 width=37) (actual time=0.066..0.127 rows=2 loops=1,234)

  • Filter: (precatorio_participante_id = tab1_3.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
641. 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)

642. 0.005 0.005 ↑ 1.0 4 1

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

  • Filter: saldo
  • Rows Removed by Filter: 5
643. 16.456 16.456 ↑ 1.0 1 8,228

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

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

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=8,228)

  • Index Cond: (id = precatorios_19.processo_principal_id)
645. 0.000 0.000 ↑ 1.0 1 7,505

Materialize (cost=1.38..17.50 rows=1 width=16) (actual time=0.000..0.000 rows=1 loops=7,505)

646. 0.005 0.032 ↑ 1.0 1 1

Nested Loop (cost=1.38..17.49 rows=1 width=16) (actual time=0.027..0.032 rows=1 loops=1)

647. 0.002 0.025 ↑ 1.0 1 1

Nested Loop (cost=1.23..9.31 rows=1 width=16) (actual time=0.022..0.025 rows=1 loops=1)

648. 0.003 0.019 ↑ 1.0 1 1

Nested Loop (cost=0.69..8.74 rows=1 width=8) (actual time=0.018..0.019 rows=1 loops=1)

649. 0.003 0.013 ↑ 1.0 1 1

Result (cost=0.54..0.55 rows=1 width=0) (actual time=0.013..0.013 rows=1 loops=1)

650.          

Initplan (for Result)

651. 0.001 0.010 ↑ 1.0 1 1

Limit (cost=0.15..0.54 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=1)

652. 0.009 0.009 ↑ 149.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tipo_situacao_pagamentos_3 (cost=0.15..58.60 rows=149 width=8) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Filter: (ativo AND indica_sem_lancamentos)
653. 0.003 0.003 ↑ 1.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_sem_lancamentos_1 (cost=0.15..8.17 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=1)

  • Index Cond: (id = ($43))
  • Filter: ativo
654. 0.002 0.004 ↑ 1.0 1 1

Result (cost=0.54..0.55 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=1)

655.          

Initplan (for Result)

656. 0.000 0.002 ↑ 1.0 1 1

Limit (cost=0.15..0.54 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

657. 0.002 0.002 ↑ 149.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tipo_situacao_pagamentos_4 (cost=0.15..58.60 rows=149 width=8) (actual time=0.002..0.002 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Filter: (ativo AND indica_em_pagamento)
  • Rows Removed by Filter: 1
658. 0.002 0.002 ↑ 1.0 1 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_em_pgto_1 (cost=0.15..8.17 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=1)

  • Index Cond: (id = ($44))
  • Filter: ativo
659. 0.169 1,559.112 ↓ 29.8 596 1

Sort (cost=791,686.29..791,686.34 rows=20 width=8) (actual time=1,559.057..1,559.112 rows=596 loops=1)

  • Sort Key: prim_ev_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 52kB
660. 0.082 1,558.943 ↓ 29.8 596 1

Subquery Scan on prim_ev_1 (cost=791,685.61..791,685.86 rows=20 width=8) (actual time=1,558.829..1,558.943 rows=596 loops=1)

661. 3.583 1,558.861 ↓ 29.8 596 1

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

  • Sort Key: tab1_4.numero_processo_principal, tab1_4.participantes_nome
  • Sort Method: quicksort Memory: 183kB
662. 3.648 1,555.278 ↓ 29.8 596 1

Subquery Scan on tab1_4 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=99.308..1,555.278 rows=596 loops=1)

  • Filter: (tab1_4.data_evento_id = (SubPlan 11))
  • Rows Removed by Filter: 638
663. 3.356 101.680 ↑ 3.2 1,234 1

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

664. 30.026 98.324 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=97.851..98.324 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
665. 1.536 68.298 ↑ 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=66.307..68.298 rows=3,944 loops=1)

666. 45.148 66.762 ↑ 1.0 3,944 1

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

  • Sort Key: precatorios_12.id, participantes_10.nome, tipo_papeis_7.descricao, evento_financeiros_7.data_evento, evento_financeiros_7.id, configuracao_rubrica_precatorios_6.ordem_apresentacao
  • Sort Method: quicksort Memory: 2130kB
667. 7.197 21.614 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_12.processo_principal_id = processo_principais_9.id)
668. 2.211 13.798 ↑ 1.0 3,944 1

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

  • Hash Cond: ((configuracao_rubrica_precatorios_6.precatorio_id = precatorios_12.id) AND (configuracao_rubrica_precatorios_6.tipo_rubrica_id = tipo_rubricas_6.id))
669. 0.114 0.114 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_6 (cost=0.00..15.93 rows=793 width=12) (actual time=0.003..0.114 rows=793 loops=1)

670. 1.863 11.473 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
671. 1.201 9.610 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_6.tipo_rubrica_id = tipo_rubricas_6.id)
672. 1.738 8.394 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_6.evento_financeiro_id = evento_financeiros_7.id)
673. 0.348 0.348 ↑ 1.0 3,944 1

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

674. 0.501 6.308 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
675. 0.433 5.807 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.tipo_papel_id = tipo_papeis_7.id)
676. 0.368 5.370 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.participante_id = participantes_10.id)
677. 0.349 3.867 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.precatorio_id = precatorios_12.id)
678. 0.355 2.954 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros_7.tipo_evento_financeiro_id = tipo_evento_financeiros_7.id)
679. 0.863 2.588 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.id = evento_financeiros_7.precatorio_participante_id)
680. 1.276 1.276 ↓ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_11 (cost=0.00..194.22 rows=7,522 width=48) (actual time=0.002..1.276 rows=7,524 loops=1)

681. 0.221 0.449 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
682. 0.228 0.228 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_7 (cost=0.00..30.34 rows=1,234 width=37) (actual time=0.003..0.228 rows=1,234 loops=1)

683. 0.004 0.011 ↑ 1.0 9 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
684. 0.007 0.007 ↑ 1.0 9 1

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

685. 0.244 0.564 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
686. 0.320 0.320 ↓ 1.0 1,908 1

Seq Scan on precatorios precatorios_12 (cost=0.00..62.07 rows=1,907 width=16) (actual time=0.003..0.320 rows=1,908 loops=1)

687. 0.578 1.135 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
688. 0.557 0.557 ↓ 1.0 3,142 1

Seq Scan on participantes participantes_10 (cost=0.00..90.41 rows=3,141 width=36) (actual time=0.003..0.557 rows=3,142 loops=1)

689. 0.001 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
690. 0.003 0.003 ↑ 1.0 6 1

Seq Scan on tipo_papeis tipo_papeis_7 (cost=0.00..1.06 rows=6 width=16) (actual time=0.002..0.003 rows=6 loops=1)

691. 0.008 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
692. 0.007 0.007 ↑ 1.0 35 1

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

693. 0.301 0.619 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
694. 0.318 0.318 ↓ 1.0 2,064 1

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

695.          

SubPlan (for Subquery Scan)

696. 2.468 1,449.950 ↑ 1.0 1 1,234

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

697. 7.404 1,447.482 ↑ 1.5 2 1,234

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

698. 78.976 1,440.078 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_eventos_rubricas_12.precatorios_id, precatorios_eventos_rubricas_12.participantes_nome, precatorios_eventos_rubricas_12.data_evento, precatorios_eventos_rubricas_12.data_evento_id, precatorios_eventos_rubricas_12.numero_processo_principal, precatorios_eventos_rubricas_12.evento_financeiros_id, precatorios_eventos_rubricas_12.tipo_evento_descricao, precatorios_eventos_rubricas_12.tipo_evento_calculavel, precatorios_eventos_rubricas_12.tipo_evento_pagamento, precatorios_eventos_rubricas_12.tipo_evento_primeiro_evento, precatorios_eventos_rubricas_12.tipo_evento_saldo, precatorios_eventos_rubricas_12.participantes_id, precatorios_eventos_rubricas_12.precatorio_participantes_id
  • Sort Method: quicksort Memory: 25kB
699. 4.936 1,361.102 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_12 (cost=200.00..200.04 rows=3 width=151) (actual time=1.100..1.103 rows=7 loops=1,234)

700. 88.848 1,356.166 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_20.id, participantes_18.nome, tipo_papeis_15.descricao, evento_financeiros_15.data_evento, evento_financeiros_15.id, configuracao_rubrica_precatorios_14.ordem_apresentacao
  • Sort Method: quicksort Memory: 26kB
701. 34.138 1,267.318 ↓ 2.3 7 1,234

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

702. 120.932 1,216.724 ↓ 2.3 7 1,234

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

  • Hash Cond: ((configuracao_rubrica_precatorios_14.precatorio_id = precatorios_20.id) AND (configuracao_rubrica_precatorios_14.tipo_rubrica_id = tipo_rubricas_14.id))
703. 65.402 65.402 ↑ 1.0 793 1,234

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=1,234)

704. 7.404 1,030.390 ↓ 2.3 7 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
705. 2.054 1,022.986 ↓ 2.3 7 1,234

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

706. 3.702 1,004.476 ↓ 2.3 7 1,234

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

707. 3.702 23.446 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_19.tipo_papel_id = tipo_papeis_15.id)
  • Rows Removed by Join Filter: 5
708. 2.468 18.510 ↑ 1.0 1 1,234

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

709. 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)

710. 7.404 7.404 ↑ 1.0 1 1,234

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

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

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

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

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=1,234)

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

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,234)

714. 12.340 977.328 ↓ 2.3 7 1,234

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

  • Join Filter: (evento_financeiros_15.tipo_evento_financeiro_id = tipo_evento_financeiros_15.id)
  • Rows Removed by Join Filter: 21
715. 461.516 964.988 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_14.evento_financeiro_id = evento_financeiros_15.id)
716. 352.924 352.924 ↑ 1.0 3,944 1,234

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

717. 2.468 150.548 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
718. 148.080 148.080 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_15 (cost=0.00..33.42 rows=2 width=37) (actual time=0.062..0.120 rows=2 loops=1,234)

  • Filter: (precatorio_participante_id = tab1_4.precatorio_participantes_id)
  • Rows Removed by Filter: 1232
719. 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)

720. 0.005 0.005 ↑ 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.005 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
721. 16.456 16.456 ↑ 1.0 1 8,228

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.002 rows=1 loops=8,228)

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

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=8,228)

  • Index Cond: (id = precatorios_20.processo_principal_id)
723. 0.014 5.870 ↑ 22.2 79 1

Hash (cost=996.49..996.49 rows=1,751 width=16) (actual time=5.870..5.870 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
724. 0.018 5.856 ↑ 22.2 79 1

Subquery Scan on pevr_pagamentos_1 (cost=974.60..996.49 rows=1,751 width=16) (actual time=5.836..5.856 rows=79 loops=1)

725. 0.652 5.838 ↑ 22.2 79 1

Sort (cost=974.60..978.98 rows=1,751 width=212) (actual time=5.834..5.838 rows=79 loops=1)

  • Sort Key: precatorios_13.id, participantes_11.nome, tipo_papeis_8.descricao, evento_financeiros_8.data_evento, evento_financeiros_8.id, configuracao_rubrica_precatorios_7.ordem_apresentacao
  • Sort Method: quicksort Memory: 65kB
726. 0.381 5.186 ↑ 22.2 79 1

Hash Join (cost=764.80..880.27 rows=1,751 width=212) (actual time=4.689..5.186 rows=79 loops=1)

  • Hash Cond: (processo_principais_10.id = precatorios_13.processo_principal_id)
727. 0.153 0.153 ↓ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_10 (cost=0.00..52.63 rows=2,063 width=33) (actual time=0.007..0.153 rows=2,064 loops=1)

728. 0.041 4.652 ↑ 22.2 79 1

Hash (cost=742.91..742.91 rows=1,751 width=195) (actual time=4.652..4.652 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
729. 0.130 4.611 ↑ 22.2 79 1

Hash Right Join (cost=718.84..742.91 rows=1,751 width=195) (actual time=4.447..4.611 rows=79 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios_7.precatorio_id = precatorios_13.id) AND (configuracao_rubrica_precatorios_7.tipo_rubrica_id = tipo_rubricas_7.id))
730. 0.046 0.046 ↑ 1.0 793 1

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_7 (cost=0.00..15.93 rows=793 width=12) (actual time=0.001..0.046 rows=793 loops=1)