explain.depesz.com

PostgreSQL's explain analyze made readable

Result: igtw

Settings
# exclusive inclusive rows x rows loops node
1. 1.199 9,200.082 ↑ 15.5 1,494 1

Sort (cost=4,871,127.10..4,871,185.17 rows=23,229 width=1,241) (actual time=9,199.997..9,200.082 rows=1,494 loops=1)

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

Sort (cost=4,869,152.21..4,869,210.29 rows=23,229 width=1,172) (actual time=9,198.741..9,198.883 rows=1,494 loops=1)

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

Hash Left Join (cost=3,989,575.30..4,867,467.69 rows=23,229 width=1,172) (actual time=8,368.186..9,192.289 rows=1,494 loops=1)

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

Hash Join (cost=2,398,920.21..3,274,404.43 rows=23,229 width=1,164) (actual time=5,374.945..6,196.753 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = percentual_cadastro_quitacao_precatorio.precatorio_id)
5. 0.846 3,260.468 ↑ 15.5 1,494 1

Hash Left Join (cost=803,483.42..1,673,131.36 rows=23,229 width=1,155) (actual time=2,439.954..3,260.468 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = precatorios_1.id)
6. 2.054 3,242.714 ↑ 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,423.036..3,242.714 rows=1,494 loops=1)

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

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

8. 18.099 1,904.030 ↓ 4.7 5,052 1

Sort (cost=793,058.70..793,061.36 rows=1,064 width=65) (actual time=1,903.489..1,904.030 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.694 1,885.931 ↓ 4.7 5,052 1

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

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

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

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

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

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

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

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

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

14. 9.005 14.704 ↓ 1.0 2,656 1

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_1.precatorio_id = precatorios_2.id)
17. 1.225 1.225 ↓ 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.004..1.225 rows=2,656 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4868
18. 0.294 1.932 ↓ 1.0 1,908 1

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

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

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

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

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

21. 0.316 0.662 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
22. 0.346 0.346 ↓ 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.006..0.346 rows=2,064 loops=1)

23. 0.486 0.976 ↓ 1.0 3,142 1

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

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

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

25. 0.104 1,864.381 ↓ 29.8 596 1

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

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

27. 3.660 1,864.149 ↓ 29.8 596 1

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

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

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

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

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

30. 59.680 216.757 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=216.275..216.757 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. 2.753 157.077 ↑ 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=153.474..157.077 rows=3,944 loops=1)

32. 87.567 154.324 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=153.469..154.324 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. 14.241 66.757 ↑ 1.0 3,944 1

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

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

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=44.883..49.569 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.216 0.216 ↑ 1.0 793 1

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

36. 5.972 44.850 ↑ 1.0 3,944 1

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

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

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

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

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

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

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

40. 2.191 27.036 ↑ 1.0 1,234 1

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_2.id = evento_financeiros.precatorio_participante_id)
46. 5.265 5.265 ↓ 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..5.265 rows=7,524 loops=1)

47. 0.884 1.635 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
48. 0.751 0.751 ↑ 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.751 rows=1,234 loops=1)

49. 0.004 0.016 ↑ 1.0 9 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
50. 0.012 0.012 ↑ 1.0 9 1

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

51. 2.979 6.035 ↓ 1.0 1,908 1

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

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

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

53. 1.134 2.073 ↓ 1.0 3,142 1

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

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

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

55. 0.003 0.009 ↑ 1.0 6 1

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

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

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

57. 0.014 0.029 ↑ 1.0 35 1

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

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

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

59. 2.211 2.947 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
60. 0.736 0.736 ↓ 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.015..0.736 rows=2,064 loops=1)

61.          

SubPlan (for Subquery Scan)

62. 3.702 1,637.518 ↑ 1.0 1 1,234

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

63. 8.638 1,633.816 ↑ 1.5 2 1,234

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

64. 91.316 1,625.178 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.317..1.317 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. 4.936 1,533.862 ↓ 2.3 7 1,234

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

66. 106.124 1,528.926 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.238..1.239 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. 37.840 1,422.802 ↓ 2.3 7 1,234

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

68. 139.442 1,368.506 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=1.009..1.109 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. 76.508 76.508 ↑ 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.062 rows=793 loops=1,234)

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

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

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

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

72. 2.468 1,124.174 ↓ 2.3 7 1,234

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

73. 4.936 24.680 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.017..0.020 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 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)

75. 2.468 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)

76. 7.404 7.404 ↑ 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.006..0.006 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. 3.702 3.702 ↑ 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.003..0.003 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. 14.808 1,097.026 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.498..0.889 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. 551.598 1,082.218 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_10.evento_financeiro_id = evento_financeiros_11.id)
82. 364.030 364.030 ↑ 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.295 rows=3,944 loops=1,234)

83. 2.468 166.590 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
84. 164.122 164.122 ↑ 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.064..0.133 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.009 0.009 ↑ 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.006..0.009 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. 1.030 2.147 ↓ 1.0 7,524 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 315kB
90. 1.117 1.117 ↓ 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.117 rows=7,524 loops=1)

91. 0.268 0.683 ↓ 1.0 2,140 1

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

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

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

93. 0.001 0.001 ↓ 0.0 0 1

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

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

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

95.          

SubPlan (for GroupAggregate)

96. 0.360 810.000 ↑ 1.0 1 360

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

97. 1.080 809.640 ↓ 0.0 0 360

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

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

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

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

GroupAggregate (cost=416.30..416.40 rows=2 width=151) (actual time=2.173..2.174 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. 32.040 779.760 ↓ 5.5 11 360

Sort (cost=416.30..416.30 rows=2 width=151) (actual time=2.165..2.166 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 747.720 ↓ 5.5 11 360

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

102. 44.640 745.920 ↓ 5.5 11 360

Sort (cost=416.26..416.27 rows=2 width=212) (actual time=2.072..2.072 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. 29.272 701.280 ↓ 5.5 11 360

Nested Loop Left Join (cost=258.38..416.25 rows=2 width=212) (actual time=1.549..1.948 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. 0.752 644.400 ↓ 5.5 11 360

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

105. 1.080 635.760 ↓ 5.5 11 360

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

106. 2.160 2.160 ↑ 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.005..0.006 rows=1 loops=360)

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

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

108. 129.960 622.440 ↓ 5.5 11 360

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

  • Hash Cond: (rubrica_eventos_9.evento_financeiro_id = evento_financeiros_10.id)
109. 88.920 88.920 ↑ 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.247 rows=3,944 loops=360)

110. 1.080 403.560 ↓ 3.0 3 360

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
111. 2.726 402.480 ↓ 3.0 3 360

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

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

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

113. 1.492 395.280 ↓ 3.0 3 360

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

114. 33.480 391.320 ↓ 3.0 3 360

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

  • Hash Cond: (evento_financeiros_10.precatorio_participante_id = precatorio_participantes_14.id)
115. 73.800 73.800 ↑ 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.001..0.205 rows=1,234 loops=360)

116. 1.080 284.040 ↑ 1.0 4 360

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

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

Seq Scan on precatorio_participantes precatorio_participantes_14 (cost=0.00..213.03 rows=4 width=48) (actual time=0.145..0.786 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.000..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.001..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. 2.408 27.608 ↓ 2.5 5 3,944

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

124. 25.200 25.200 ↑ 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.038..0.070 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.080 25.740 ↑ 1.0 1 20

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

127. 0.220 25.660 ↑ 1.0 3 20

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

128. 2.180 25.440 ↓ 4.0 12 20

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.271..1.272 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 23.260 ↓ 4.0 12 20

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

130. 3.160 23.140 ↓ 4.0 12 20

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.156..1.157 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.758 19.980 ↓ 4.0 12 20

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

132. 2.000 18.740 ↓ 4.0 12 20

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.810..0.937 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. 0.980 0.980 ↑ 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.001..0.049 rows=793 loops=20)

134. 0.180 15.760 ↓ 4.0 12 20

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

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

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

136. 0.080 15.100 ↓ 4.0 12 20

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

137. 0.080 0.440 ↑ 1.0 1 20

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

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

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

139. 0.040 0.240 ↑ 1.0 1 20

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

140. 0.140 0.140 ↑ 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.007 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.002..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.020 0.020 ↑ 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.001 rows=6 loops=20)

144. 0.360 14.580 ↓ 4.0 12 20

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.171..0.729 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. 6.880 14.220 ↓ 2.7 16 20

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

  • Hash Cond: (rubrica_eventos_8.evento_financeiro_id = evento_financeiros_9.id)
146. 5.000 5.000 ↑ 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.250 rows=3,944 loops=20)

147. 0.040 2.340 ↓ 2.0 4 20

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
148. 2.300 2.300 ↓ 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.115 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.004 0.004 ↑ 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.002..0.004 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. 3.532 517.268 ↑ 15.5 1,494 1

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

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

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

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

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

156. 2.454 25.117 ↑ 1.0 2,825 1

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

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

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

  • Hash Cond: (depre.precatorio_participante_id = pp_1.id)
158. 15.391 15.391 ↑ 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=1.099..15.391 rows=2,825 loops=1)

159. 2.088 4.461 ↓ 1.0 7,524 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 353kB
160. 2.373 2.373 ↓ 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.008..2.373 rows=7,524 loops=1)

161. 3.177 468.136 ↑ 15.5 1,494 1

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

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

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

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

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

164. 84.451 105.351 ↓ 1.0 7,524 1

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_3.precatorio_id = precatorios_4.id)
167. 3.412 3.412 ↓ 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.005..3.412 rows=7,524 loops=1)

168. 0.671 4.357 ↓ 1.0 1,908 1

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

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

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

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

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

171. 0.754 1.455 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
172. 0.701 0.701 ↓ 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.010..0.701 rows=2,064 loops=1)

173. 1.527 2.934 ↓ 1.0 3,142 1

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

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

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

175. 3.724 348.062 ↑ 3.9 1,494 1

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

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

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

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

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

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

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

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

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

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

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

181. 6.010 64.147 ↓ 1.0 7,787 1

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

  • Merge Cond: (precatorios_5.id = precatorio_participantes_4.precatorio_id)
182. 2.734 2.734 ↓ 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=1.205..2.734 rows=1,908 loops=1)

  • Heap Fetches: 132
183. 7.815 55.403 ↓ 1.0 7,787 1

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

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

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

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

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

  • Hash Cond: (oficio_orcamentarios_normais.precatorio_participante_id = precatorio_participantes_4.id)
186. 0.400 0.400 ↑ 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.011..0.400 rows=1,043 loops=1)

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

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

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

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 373kB
191. 2.901 2.901 ↓ 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.011..2.901 rows=7,524 loops=1)

192. 1.076 2.521 ↓ 1.0 2,140 1

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

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

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

194. 2.258 226.521 ↑ 3.9 1,494 1

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

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

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

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

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

197. 0.637 16.079 ↑ 22.2 79 1

Sort (cost=1,090.81..1,095.19 rows=1,751 width=41) (actual time=16.071..16.079 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.050 15.442 ↑ 22.2 79 1

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

199. 1.679 15.392 ↑ 22.2 79 1

Sort (cost=974.60..978.98 rows=1,751 width=212) (actual time=15.364..15.392 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.882 13.713 ↑ 22.2 79 1

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

  • Hash Cond: (processo_principais_4.id = precatorios_6.processo_principal_id)
201. 0.425 0.425 ↓ 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.014..0.425 rows=2,064 loops=1)

202. 0.162 12.406 ↑ 22.2 79 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
203. 0.370 12.244 ↑ 22.2 79 1

Hash Right Join (cost=718.84..742.91 rows=1,751 width=195) (actual time=11.738..12.244 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. 0.172 0.172 ↑ 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=0.010..0.172 rows=793 loops=1)

205. 0.098 11.702 ↑ 22.2 79 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
206. 0.074 11.604 ↑ 22.2 79 1

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

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

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

  • Hash Cond: (rubrica_eventos_1.evento_financeiro_id = evento_financeiros_1.id)
208. 0.915 0.915 ↑ 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=0.012..0.915 rows=3,944 loops=1)

209. 0.030 9.274 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
210. 0.039 9.244 ↑ 27.4 20 1

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

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

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_5.id = evento_financeiros_1.precatorio_participante_id)
214. 2.962 2.962 ↓ 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.006..2.962 rows=7,524 loops=1)

215. 0.015 0.797 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
216. 0.283 0.782 ↑ 27.4 20 1

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

  • Hash Cond: (evento_financeiros_1.tipo_evento_financeiro_id = tipo_evento_financeiros_1.id)
217. 0.486 0.486 ↑ 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.486 rows=1,234 loops=1)

218. 0.003 0.013 ↑ 1.0 4 1

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

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

  • Filter: pagamento
  • Rows Removed by Filter: 5
220. 0.651 1.528 ↓ 1.0 1,908 1

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

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

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

222. 1.227 2.494 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
223. 1.267 1.267 ↓ 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..1.267 rows=3,142 loops=1)

224. 0.005 0.011 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=16) (actual time=0.011..0.011 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.003..0.006 rows=6 loops=1)

226. 0.017 0.036 ↑ 1.0 35 1

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

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

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

228. 2.415 206.380 ↑ 3.9 1,494 1

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

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

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

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

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

231. 0.002 0.803 ↓ 0.0 0 1

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

232. 0.226 0.801 ↓ 0.0 0 1

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

  • Hash Cond: (evento_financeiros_2.tipo_evento_financeiro_id = tipo_evento_financeiros_2.id)
233. 0.564 0.564 ↑ 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.012..0.564 rows=1,234 loops=1)

234. 0.002 0.011 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
235. 0.009 0.009 ↑ 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.007..0.009 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. 3.255 201.260 ↑ 3.9 1,494 1

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

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

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

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

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

240. 50.282 76.036 ↓ 1.0 7,524 1

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

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

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

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

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

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

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

  • Hash Cond: (prec_part_1.precatorio_id = prec.id)
244. 5.084 5.084 ↓ 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.005..5.084 rows=7,524 loops=1)

245. 0.723 4.845 ↓ 1.0 1,908 1

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

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

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

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

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

248. 0.791 1.581 ↓ 1.0 2,064 1

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

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

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

250. 0.001 0.008 ↑ 1.0 2 1

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

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

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

252. 1.015 2.036 ↓ 1.0 3,142 1

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

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

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

254. 3.477 92.508 ↓ 1.0 1,494 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

263. 0.005 0.012 ↑ 1.0 6 1

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

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

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

265. 1.859 65.982 ↓ 1.0 1,494 1

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

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

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

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

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

268. 2.029 38.560 ↓ 1.0 1,085 1

Sort (cost=319.15..321.86 rows=1,084 width=76) (actual time=38.280..38.560 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.842 36.531 ↓ 1.0 1,085 1

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

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

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

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

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

272. 0.578 18.143 ↓ 1.0 1,085 1

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

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

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

  • Hash Cond: (p_prin_p_int.processo_principal_id = p_prin.id)
274. 14.765 14.765 ↓ 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=7.771..14.765 rows=1,085 loops=1)

275. 0.920 1.764 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
276. 0.844 0.844 ↓ 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.014..0.844 rows=2,064 loops=1)

277. 0.478 15.785 ↓ 1.0 1,125 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 65kB
278. 15.307 15.307 ↓ 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.007..15.307 rows=1,125 loops=1)

279. 2.071 20.761 ↓ 1.0 1,494 1

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (proc_prin.id = precatorios.processo_principal_id)
285. 0.553 0.553 ↓ 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.009..0.553 rows=2,064 loops=1)

286. 1.011 4.766 ↓ 1.0 1,494 1

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

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

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

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

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

289. 0.100 0.745 ↑ 1.0 223 1

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

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

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

291. 0.041 0.092 ↑ 1.0 23 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
292. 0.035 0.051 ↑ 1.0 23 1

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

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

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

294. 0.005 0.008 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=44) (actual time=0.008..0.008 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.007 0.013 ↑ 1.0 11 1

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

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

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

298. 0.002 0.009 ↑ 1.0 4 1

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

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

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

300. 0.015 6.679 ↑ 1.0 15 1

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

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

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

302. 0.007 6.329 ↑ 1.0 3 1

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

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

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

304. 0.003 0.011 ↑ 1.0 3 1

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

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

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

306. 0.003 0.013 ↑ 1.0 2 1

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

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

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

308. 0.002 0.007 ↑ 1.0 2 1

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

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

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

310. 0.005 0.018 ↑ 1.0 4 1

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

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

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

312. 0.154 16.908 ↓ 3.5 915 1

Hash (cost=190.73..190.73 rows=258 width=16) (actual time=16.908..16.908 rows=915 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 43kB
313. 0.350 16.754 ↓ 3.5 915 1

Hash Join (cost=121.50..190.73 rows=258 width=16) (actual time=16.061..16.754 rows=915 loops=1)

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

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

315. 0.306 16.050 ↓ 1,007.0 1,007 1

Hash (cost=121.49..121.49 rows=1 width=24) (actual time=16.050..16.050 rows=1,007 loops=1)

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

Nested Loop (cost=109.72..121.49 rows=1 width=24) (actual time=7.494..15.744 rows=1,007 loops=1)

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

Nested Loop (cost=109.72..119.99 rows=1 width=32) (actual time=7.483..11.168 rows=1,007 loops=1)

318. 1.600 8.925 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.44..119.65 rows=1 width=24) (actual time=7.058..8.925 rows=1,007 loops=1)

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

Nested Loop (cost=109.44..118.58 rows=1 width=28) (actual time=7.049..7.325 rows=1,007 loops=1)

320. 0.019 0.019 ↑ 1.0 1 1

Seq Scan on tipo_pendencias (cost=0.00..2.26 rows=1 width=20) (actual time=0.016..0.019 rows=1 loops=1)

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

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

322. 0.629 6.787 ↓ 2.9 1,007 1

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

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

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

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

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

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

SubPlan (for Seq Scan)

326. 0.128 0.128 ↓ 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.128 rows=1,085 loops=1)

327. 0.000 0.000 ↑ 1.0 3 1,007

Seq Scan on gravidade_pendencias (cost=0.00..1.03 rows=3 width=8) (actual time=0.000..0.000 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.282 2,934.967 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 105kB
331. 0.202 2,934.685 ↓ 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=2,930.675..2,934.685 rows=1,908 loops=1)

332. 3.481 2,934.483 ↓ 1.0 1,908 1

GroupAggregate (cost=1,595,222.25..1,595,393.88 rows=1,907 width=28) (actual time=2,930.673..2,934.483 rows=1,908 loops=1)

333. 2.190 2,931.002 ↓ 4.0 7,550 1

Sort (cost=1,595,222.25..1,595,227.02 rows=1,907 width=28) (actual time=2,930.648..2,931.002 rows=7,550 loops=1)

  • Sort Key: prec_1.id, pp_2.precatorio_id
  • Sort Method: quicksort Memory: 782kB
334. 2.643 2,928.812 ↓ 4.0 7,550 1

Merge Right Join (cost=1,594,743.99..1,595,118.34 rows=1,907 width=28) (actual time=2,907.244..2,928.812 rows=7,550 loops=1)

  • Merge Cond: (pp_2.precatorio_id = prec_1.id)
335. 3.303 2,925.090 ↓ 8.0 7,524 1

Nested Loop (cost=1,594,743.72..1,595,040.93 rows=941 width=20) (actual time=2,907.218..2,925.090 rows=7,524 loops=1)

336. 6.567 2,914.263 ↓ 8.0 7,524 1

GroupAggregate (cost=1,594,743.57..1,594,814.14 rows=941 width=217) (actual time=2,907.204..2,914.263 rows=7,524 loops=1)

337. 5.434 2,907.696 ↓ 8.1 7,583 1

Sort (cost=1,594,743.57..1,594,745.92 rows=941 width=217) (actual time=2,907.191..2,907.696 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.235 2,902.262 ↓ 8.1 7,583 1

Merge Semi Join (cost=1,585,934.50..1,594,697.09 rows=941 width=217) (actual time=2,898.437..2,902.262 rows=7,583 loops=1)

  • Merge Cond: (tp_sit_pgto_quitado.id = ($29))
339. 5.075 2,900.004 ↑ 24.8 22,749 1

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

340. 1.276 1.276 ↑ 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=1.269..1.276 rows=3 loops=1)

  • Filter: ativo
341. 3.389 2,893.653 ↓ 4.0 7,583 3

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

342. 1.257 2,890.264 ↓ 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,882.336..2,890.264 rows=7,583 loops=1)

  • Hash Cond: (pp_2.id = pevr_pagamentos.precatorio_participantes_id)
343. 1.396 2,883.205 ↓ 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,876.521..2,883.205 rows=7,524 loops=1)

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

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

345. 2.218 1,455.439 ↓ 1.0 7,524 1

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (pp_2.precatorio_id = prec_2.id)
352. 2.488 2.488 ↓ 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.488 rows=7,524 loops=1)

353. 0.408 2.074 ↓ 1.0 1,908 1

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

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

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

  • Hash Cond: (prec_2.processo_principal_id = pprin.id)
355. 0.337 0.337 ↓ 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.337 rows=1,908 loops=1)

356. 0.334 0.695 ↓ 1.0 2,064 1

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

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

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

358. 0.511 1.026 ↓ 1.0 3,142 1

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

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

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

360. 0.003 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
361. 0.003 0.003 ↑ 1.0 6 1

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

362. 0.003 0.006 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=30) (actual time=0.006..0.006 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.003..0.003 rows=2 loops=1)

364. 0.379 0.792 ↓ 1.0 2,140 1

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

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

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

366. 0.205 1,432.924 ↓ 29.8 596 1

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

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

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

368. 3.321 1,432.591 ↓ 29.8 596 1

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

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

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

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

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

371. 29.477 100.238 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=99.822..100.238 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.591 70.761 ↑ 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=68.686..70.761 rows=3,944 loops=1)

373. 46.827 69.170 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=68.683..69.170 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.688 22.343 ↑ 1.0 3,944 1

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

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

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=11.551..14.980 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.091 0.091 ↑ 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.002..0.091 rows=793 loops=1)

377. 1.760 11.533 ↑ 1.0 3,944 1

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

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

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

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

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

  • Hash Cond: (rubrica_eventos_2.evento_financeiro_id = evento_financeiros_3.id)
380. 0.349 0.349 ↑ 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.002..0.349 rows=3,944 loops=1)

381. 0.506 6.466 ↑ 1.0 1,234 1

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_7.id = evento_financeiros_3.precatorio_participante_id)
387. 1.311 1.311 ↓ 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.311 rows=7,524 loops=1)

388. 0.231 0.509 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
389. 0.278 0.278 ↑ 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.004..0.278 rows=1,234 loops=1)

390. 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
391. 0.005 0.005 ↑ 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.002..0.005 rows=9 loops=1)

392. 0.247 0.594 ↓ 1.0 1,908 1

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

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

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

394. 0.514 1.031 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
395. 0.517 0.517 ↓ 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.517 rows=3,142 loops=1)

396. 0.003 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.002 0.002 ↑ 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.002 rows=6 loops=1)

398. 0.007 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.008 0.008 ↑ 1.0 35 1

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

400. 0.314 0.675 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
401. 0.361 0.361 ↓ 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.008..0.361 rows=2,064 loops=1)

402.          

SubPlan (for Subquery Scan)

403. 3.702 1,324.082 ↑ 1.0 1 1,234

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

404. 6.170 1,320.380 ↑ 1.5 2 1,234

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

405. 74.040 1,314.210 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.064..1.065 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,240.170 ↓ 2.3 7 1,234

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

407. 83.912 1,236.468 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.002..1.002 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. 26.734 1,152.556 ↓ 2.3 7 1,234

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

409. 114.762 1,109.366 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.824..0.899 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. 59.232 59.232 ↑ 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.048 rows=793 loops=1,234)

411. 6.170 935.372 ↓ 2.3 7 1,234

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

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

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

413. 2.468 913.160 ↓ 2.3 7 1,234

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

414. 3.702 28.382 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.020..0.023 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 23.446 ↑ 1.0 1 1,234

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

416. 1.234 18.510 ↑ 1.0 1 1,234

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

417. 13.574 13.574 ↑ 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.011..0.011 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.002..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. 11.106 882.310 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.420..0.715 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. 426.964 871.204 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_11.evento_financeiro_id = evento_financeiros_12.id)
423. 304.798 304.798 ↑ 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.247 rows=3,944 loops=1,234)

424. 2.468 139.442 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
425. 136.974 136.974 ↑ 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.056..0.111 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.009 0.009 ↑ 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.005..0.009 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.003 0.033 ↑ 1.0 1 1

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

432. 0.004 0.028 ↑ 1.0 1 1

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

433. 0.004 0.018 ↑ 1.0 1 1

Nested Loop (cost=0.69..8.74 rows=1 width=8) (actual time=0.017..0.018 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.002..0.003 rows=1 loops=1)

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

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

440.          

Initplan (for Result)

441. 0.001 0.004 ↑ 1.0 1 1

Limit (cost=0.15..0.54 rows=1 width=8) (actual time=0.004..0.004 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.002 0.002 ↑ 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.001..0.002 rows=1 loops=1)

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

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

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

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

446. 3.385 1,423.682 ↓ 29.8 596 1

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

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

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

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

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

449. 29.904 95.736 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=95.155..95.736 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.513 65.832 ↑ 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=63.873..65.832 rows=3,944 loops=1)

451. 43.144 64.319 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=63.870..64.319 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.662 21.175 ↑ 1.0 3,944 1

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

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

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=11.706..13.821 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.122 0.122 ↑ 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.002..0.122 rows=793 loops=1)

455. 1.898 11.690 ↑ 1.0 3,944 1

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

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

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

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

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

  • Hash Cond: (rubrica_eventos_3.evento_financeiro_id = evento_financeiros_4.id)
458. 0.374 0.374 ↑ 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.001..0.374 rows=3,944 loops=1)

459. 0.512 6.399 ↑ 1.0 1,234 1

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_8.id = evento_financeiros_4.precatorio_participante_id)
465. 1.310 1.310 ↓ 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.310 rows=7,524 loops=1)

466. 0.211 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.235 0.235 ↑ 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.235 rows=1,234 loops=1)

468. 0.005 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.004 0.004 ↑ 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.004 rows=9 loops=1)

470. 0.255 0.606 ↓ 1.0 1,908 1

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

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

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

472. 0.474 0.976 ↓ 1.0 3,142 1

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

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

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

474. 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
475. 0.002 0.002 ↑ 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.002 rows=6 loops=1)

476. 0.009 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.005 0.005 ↑ 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.005 rows=35 loops=1)

478. 0.339 0.692 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
479. 0.353 0.353 ↓ 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.006..0.353 rows=2,064 loops=1)

480.          

SubPlan (for Subquery Scan)

481. 1.234 1,310.508 ↑ 1.0 1 1,234

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

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

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

483. 74.040 1,301.870 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.055..1.055 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,227.830 ↓ 2.3 7 1,234

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

485. 83.912 1,224.128 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=0.992..0.992 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. 27.968 1,140.216 ↓ 2.3 7 1,234

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

487. 111.060 1,095.792 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.814..0.888 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 923.032 ↓ 2.3 7 1,234

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

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

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

491. 2.468 900.820 ↓ 2.3 7 1,234

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

492. 3.702 20.978 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..26.05 rows=1 width=92) (actual time=0.014..0.017 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 16.042 ↑ 1.0 1 1,234

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

494. 1.234 11.106 ↑ 1.0 1 1,234

Nested Loop (cost=0.56..16.61 rows=1 width=56) (actual time=0.008..0.009 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 877.374 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.415..0.711 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. 423.262 865.034 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_12.evento_financeiro_id = evento_financeiros_13.id)
501. 304.798 304.798 ↑ 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.247 rows=3,944 loops=1,234)

502. 2.468 136.974 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
503. 134.506 134.506 ↑ 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.055..0.109 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.005 0.005 ↑ 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.005 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.022 5.802 ↑ 22.2 79 1

Hash (cost=996.49..996.49 rows=1,751 width=16) (actual time=5.802..5.802 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
509. 0.017 5.780 ↑ 22.2 79 1

Subquery Scan on pevr_pagamentos (cost=974.60..996.49 rows=1,751 width=16) (actual time=5.761..5.780 rows=79 loops=1)

510. 0.650 5.763 ↑ 22.2 79 1

Sort (cost=974.60..978.98 rows=1,751 width=212) (actual time=5.759..5.763 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.360 5.113 ↑ 22.2 79 1

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

  • Hash Cond: (processo_principais_7.id = precatorios_10.processo_principal_id)
512. 0.135 0.135 ↓ 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.006..0.135 rows=2,064 loops=1)

513. 0.049 4.618 ↑ 22.2 79 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
514. 0.135 4.569 ↑ 22.2 79 1

Hash Right Join (cost=718.84..742.91 rows=1,751 width=195) (actual time=4.402..4.569 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.044 0.044 ↑ 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.002..0.044 rows=793 loops=1)

516. 0.038 4.390 ↑ 22.2 79 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
517. 0.038 4.352 ↑ 22.2 79 1

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

  • Hash Cond: (rubrica_eventos_4.tipo_rubrica_id = tipo_rubricas_4.id)
518. 0.385 4.298 ↑ 22.2 79 1

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

  • Hash Cond: (rubrica_eventos_4.evento_financeiro_id = evento_financeiros_5.id)
519. 0.233 0.233 ↑ 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.002..0.233 rows=3,944 loops=1)

520. 0.009 3.680 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
521. 0.030 3.671 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_9.tipo_papel_id = tipo_papeis_5.id)
522. 0.026 3.636 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_9.participante_id = participantes_8.id)
523. 0.011 2.587 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_9.precatorio_id = precatorios_10.id)
524. 0.518 1.996 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_9.id = evento_financeiros_5.precatorio_participante_id)
525. 1.178 1.178 ↓ 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.003..1.178 rows=7,524 loops=1)

526. 0.006 0.300 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
527. 0.098 0.294 ↑ 27.4 20 1

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

  • Hash Cond: (evento_financeiros_5.tipo_evento_financeiro_id = tipo_evento_financeiros_5.id)
528. 0.189 0.189 ↑ 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.189 rows=1,234 loops=1)

529. 0.001 0.007 ↑ 1.0 4 1

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

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

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

  • Filter: pagamento
  • Rows Removed by Filter: 5
531. 0.249 0.580 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
532. 0.331 0.331 ↓ 1.0 1,908 1

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

533. 0.477 1.023 ↓ 1.0 3,142 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 210kB
534. 0.546 0.546 ↓ 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.546 rows=3,142 loops=1)

535. 0.003 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
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.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
538. 0.010 0.010 ↑ 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.010 rows=35 loops=1)

539. 0.002 0.023 ↑ 1.0 1 1

Materialize (cost=0.57..0.58 rows=1 width=8) (actual time=0.023..0.023 rows=1 loops=1)

540. 0.005 0.021 ↑ 1.0 1 1

Sort (cost=0.57..0.58 rows=1 width=8) (actual time=0.021..0.021 rows=1 loops=1)

  • Sort Key: ($29)
  • Sort Method: quicksort Memory: 25kB
541. 0.004 0.016 ↑ 1.0 1 1

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

542.          

Initplan (for Result)

543. 0.001 0.012 ↑ 1.0 1 1

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

544. 0.011 0.011 ↑ 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.011..0.011 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.079 1.079 ↓ 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.022..1.079 rows=7,549 loops=1)

  • Heap Fetches: 491
547. 0.165 2,993.216 ↓ 1.9 1,304 1

Hash (cost=1,590,646.34..1,590,646.34 rows=700 width=8) (actual time=2,993.216..2,993.216 rows=1,304 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
548. 0.161 2,993.051 ↓ 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=2,982.534..2,993.051 rows=1,304 loops=1)

549. 1.385 2,992.890 ↓ 1.9 1,304 1

GroupAggregate (cost=1,590,570.30..1,590,639.34 rows=700 width=12) (actual time=2,982.532..2,992.890 rows=1,304 loops=1)

550. 2.618 2,991.505 ↓ 18.9 13,231 1

Merge Join (cost=1,590,570.30..1,590,628.84 rows=700 width=12) (actual time=2,982.520..2,991.505 rows=13,231 loops=1)

  • Merge Cond: (pp_3.precatorio_id = rpvs_3.precatorio_id)
551. 5.252 2,987.058 ↓ 15.5 7,304 1

GroupAggregate (cost=1,590,394.53..1,590,429.86 rows=471 width=217) (actual time=2,981.443..2,987.058 rows=7,304 loops=1)

552. 4.759 2,981.806 ↓ 15.5 7,306 1

Sort (cost=1,590,394.53..1,590,395.71 rows=471 width=217) (actual time=2,981.431..2,981.806 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.425 2,977.047 ↓ 15.9 7,506 1

Merge Semi Join (cost=1,585,934.50..1,590,373.62 rows=471 width=217) (actual time=2,973.027..2,977.047 rows=7,506 loops=1)

  • Merge Cond: (tp_sit_pgto_quitado_1.id = ($45))
554. 5.044 2,974.595 ↑ 12.5 22,518 1

Nested Loop (cost=1,585,933.92..1,589,660.23 rows=282,300 width=217) (actual time=2,957.684..2,974.595 rows=22,518 loops=1)

555. 0.016 0.016 ↑ 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.007..0.016 rows=3 loops=1)

  • Filter: ativo
556. 3.563 2,969.535 ↓ 8.0 7,506 3

Materialize (cost=1,585,933.77..1,586,076.68 rows=941 width=209) (actual time=985.892..989.845 rows=7,506 loops=3)

557. 1.297 2,965.972 ↓ 8.0 7,506 1

Hash Left Join (cost=1,585,933.77..1,586,071.98 rows=941 width=209) (actual time=2,957.671..2,965.972 rows=7,506 loops=1)

  • Hash Cond: (pp_3.id = pevr_pagamentos_1.precatorio_participantes_id)
558. 1.372 2,958.832 ↓ 2.0 7,505 1

Merge Left Join (cost=1,584,915.40..1,585,026.04 rows=3,761 width=201) (actual time=2,951.817..2,958.832 rows=7,505 loops=1)

  • Merge Cond: (pp_3.id = prim_ev_1.precatorio_participantes_id)
559. 2.585 1,499.449 ↓ 2.0 7,505 1

Nested Loop (cost=793,229.11..793,330.14 rows=3,761 width=193) (actual time=1,493.853..1,499.449 rows=7,505 loops=1)

560. 2.405 1,496.864 ↓ 2.0 7,505 1

Merge Left Join (cost=793,227.72..793,265.63 rows=3,761 width=177) (actual time=1,493.817..1,496.864 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. 3.963 20.229 ↓ 1.0 7,524 1

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

  • Sort Key: pp_3.id
  • Sort Method: quicksort Memory: 2068kB
562. 2.037 16.266 ↓ 1.0 7,524 1

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

  • Hash Cond: (pp_3.rpv_id = rpvs_4.id)
563. 1.353 13.005 ↓ 1.0 7,524 1

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

  • Hash Cond: (pp_3.categoria_precatorio_id = cat_prec_1.id)
564. 1.666 11.647 ↓ 1.0 7,524 1

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

  • Hash Cond: (pp_3.tipo_papel_id = tpapel_1.id)
565. 2.397 9.975 ↓ 1.0 7,524 1

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

  • Hash Cond: (pp_3.participante_id = part_1.id)
566. 2.123 6.604 ↓ 1.0 7,524 1

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

  • Hash Cond: (pp_3.precatorio_id = prec_3.id)
567. 2.394 2.394 ↓ 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.003..2.394 rows=7,524 loops=1)

568. 0.358 2.087 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 138kB
569. 0.550 1.729 ↓ 1.0 1,908 1

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

  • Hash Cond: (prec_3.processo_principal_id = pprin_1.id)
570. 0.420 0.420 ↓ 1.0 1,908 1

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

571. 0.390 0.759 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
572. 0.369 0.369 ↓ 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.006..0.369 rows=2,064 loops=1)

573. 0.509 0.974 ↓ 1.0 3,142 1

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

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

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

575. 0.002 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.004 0.004 ↑ 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.004 rows=6 loops=1)

577. 0.001 0.005 ↑ 1.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
578. 0.004 0.004 ↑ 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.004 rows=2 loops=1)

579. 0.555 1.224 ↓ 1.0 2,140 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 119kB
580. 0.669 0.669 ↓ 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.669 rows=2,140 loops=1)

581. 0.208 1,474.230 ↓ 29.8 596 1

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

  • Sort Key: ult_ev_part_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 71kB
582. 0.204 1,474.022 ↓ 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,473.779..1,474.022 rows=596 loops=1)

583. 6.362 1,473.818 ↓ 29.8 596 1

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

  • Sort Key: tab1_3.numero_processo_principal, tab1_3.participantes_nome
  • Sort Method: quicksort Memory: 183kB
584. 2.721 1,467.456 ↓ 29.8 596 1

Subquery Scan on tab1_3 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=101.289..1,467.456 rows=596 loops=1)

  • Filter: (tab1_3.data_evento_id = (SubPlan 10))
  • Rows Removed by Filter: 638
585. 3.037 99.931 ↑ 3.2 1,234 1

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

586. 31.905 96.894 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=96.494..96.894 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.357 64.989 ↑ 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=63.336..64.989 rows=3,944 loops=1)

588. 42.601 63.632 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=63.333..63.632 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. 6.729 21.031 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_11.processo_principal_id = processo_principais_8.id)
590. 1.989 13.621 ↑ 1.0 3,944 1

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=11.558..13.621 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.097 0.097 ↑ 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.003..0.097 rows=793 loops=1)

592. 1.885 11.535 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
593. 1.130 9.650 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_5.tipo_rubrica_id = tipo_rubricas_5.id)
594. 1.862 8.504 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_5.evento_financeiro_id = evento_financeiros_6.id)
595. 0.342 0.342 ↑ 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.342 rows=3,944 loops=1)

596. 0.527 6.300 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
597. 0.477 5.773 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.tipo_papel_id = tipo_papeis_6.id)
598. 0.361 5.291 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.participante_id = participantes_9.id)
599. 0.354 3.877 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.precatorio_id = precatorios_11.id)
600. 0.361 2.954 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros_6.tipo_evento_financeiro_id = tipo_evento_financeiros_6.id)
601. 0.920 2.584 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_10.id = evento_financeiros_6.precatorio_participante_id)
602. 1.205 1.205 ↓ 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.205 rows=7,524 loops=1)

603. 0.210 0.459 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
604. 0.249 0.249 ↑ 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.004..0.249 rows=1,234 loops=1)

605. 0.003 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
606. 0.006 0.006 ↑ 1.0 9 1

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

607. 0.237 0.569 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
608. 0.332 0.332 ↓ 1.0 1,908 1

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

609. 0.503 1.053 ↓ 1.0 3,142 1

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

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

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

611. 0.001 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
612. 0.004 0.004 ↑ 1.0 6 1

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

613. 0.008 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
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.003..0.008 rows=35 loops=1)

615. 0.339 0.681 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
616. 0.342 0.342 ↓ 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.008..0.342 rows=2,064 loops=1)

617.          

SubPlan (for Subquery Scan)

618. 2.468 1,364.804 ↑ 1.0 1 1,234

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

619. 7.404 1,362.336 ↑ 1.5 2 1,234

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

620. 74.040 1,354.932 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.098..1.098 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. 6.170 1,280.892 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_11 (cost=200.00..200.04 rows=3 width=151) (actual time=1.035..1.038 rows=7 loops=1,234)

622. 85.146 1,274.722 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.033..1.033 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. 29.202 1,189.576 ↓ 2.3 7 1,234

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

624. 114.762 1,143.918 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.852..0.927 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. 60.466 60.466 ↑ 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.049 rows=793 loops=1,234)

626. 14.808 968.690 ↓ 2.3 7 1,234

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

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

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

628. 2.468 935.372 ↓ 2.3 7 1,234

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

629. 3.702 20.978 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_18.tipo_papel_id = tipo_papeis_14.id)
  • Rows Removed by Join Filter: 5
630. 1.234 16.042 ↑ 1.0 1 1,234

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

631. 1.234 11.106 ↑ 1.0 1 1,234

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

632. 6.170 6.170 ↑ 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.005 rows=1 loops=1,234)

  • Index Cond: (id = tab1_3.precatorio_participantes_id)
633. 3.702 3.702 ↑ 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.002..0.003 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.002..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. 12.340 911.926 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.438..0.739 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. 441.772 899.586 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_13.evento_financeiro_id = evento_financeiros_14.id)
638. 313.436 313.436 ↑ 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.254 rows=3,944 loops=1,234)

639. 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
640. 141.910 141.910 ↑ 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.058..0.115 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.004..0.005 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
643. 8.228 8.228 ↑ 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.001 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.004 0.036 ↑ 1.0 1 1

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

647. 0.003 0.030 ↑ 1.0 1 1

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

648. 0.006 0.023 ↑ 1.0 1 1

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

649. 0.004 0.015 ↑ 1.0 1 1

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

650.          

Initplan (for Result)

651. 0.000 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)

652. 0.011 0.011 ↑ 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.011..0.011 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Filter: (ativo AND indica_sem_lancamentos)
653. 0.002 0.002 ↑ 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.002 rows=1 loops=1)

  • Index Cond: (id = ($43))
  • Filter: ativo
654. 0.001 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.001 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)

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.171 1,458.011 ↓ 29.8 596 1

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

  • Sort Key: prim_ev_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 52kB
660. 0.082 1,457.840 ↓ 29.8 596 1

Subquery Scan on prim_ev_1 (cost=791,685.61..791,685.86 rows=20 width=8) (actual time=1,457.726..1,457.840 rows=596 loops=1)

661. 3.409 1,457.758 ↓ 29.8 596 1

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

  • Sort Key: tab1_4.numero_processo_principal, tab1_4.participantes_nome
  • Sort Method: quicksort Memory: 183kB
662. 2.479 1,454.349 ↓ 29.8 596 1

Subquery Scan on tab1_4 (cost=1,659.01..791,685.18 rows=20 width=151) (actual time=116.003..1,454.349 rows=596 loops=1)

  • Filter: (tab1_4.data_evento_id = (SubPlan 11))
  • Rows Removed by Filter: 638
663. 2.963 117.916 ↑ 3.2 1,234 1

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

664. 30.617 114.953 ↑ 1.0 3,944 1

Sort (cost=1,659.01..1,668.87 rows=3,944 width=151) (actual time=114.526..114.953 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.382 84.336 ↑ 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=82.638..84.336 rows=3,944 loops=1)

666. 49.085 82.954 ↑ 1.0 3,944 1

Sort (cost=1,374.15..1,384.01 rows=3,944 width=212) (actual time=82.634..82.954 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. 9.683 33.869 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_12.processo_principal_id = processo_principais_9.id)
668. 5.230 23.073 ↑ 1.0 3,944 1

Hash Right Join (cost=893.83..922.12 rows=3,944 width=195) (actual time=17.779..23.073 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.096 0.096 ↑ 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.002..0.096 rows=793 loops=1)

670. 2.045 17.747 ↑ 1.0 3,944 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 929kB
671. 1.994 15.702 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_6.tipo_rubrica_id = tipo_rubricas_6.id)
672. 2.751 13.693 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos_6.evento_financeiro_id = evento_financeiros_7.id)
673. 0.449 0.449 ↑ 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.002..0.449 rows=3,944 loops=1)

674. 0.759 10.493 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 230kB
675. 0.602 9.734 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.tipo_papel_id = tipo_papeis_7.id)
676. 1.006 9.127 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.participante_id = participantes_10.id)
677. 0.873 6.178 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.precatorio_id = precatorios_12.id)
678. 0.354 3.826 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros_7.tipo_evento_financeiro_id = tipo_evento_financeiros_7.id)
679. 1.104 3.464 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_11.id = evento_financeiros_7.precatorio_participante_id)
680. 1.471 1.471 ↓ 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.471 rows=7,524 loops=1)

681. 0.517 0.889 ↑ 1.0 1,234 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 97kB
682. 0.372 0.372 ↑ 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.002..0.372 rows=1,234 loops=1)

683. 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
684. 0.005 0.005 ↑ 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.003..0.005 rows=9 loops=1)

685. 0.431 1.479 ↓ 1.0 1,908 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 90kB
686. 1.048 1.048 ↓ 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..1.048 rows=1,908 loops=1)

687. 1.212 1.943 ↓ 1.0 3,142 1

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

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

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

689. 0.004 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
690. 0.001 0.001 ↑ 1.0 6 1

Seq Scan on tipo_papeis tipo_papeis_7 (cost=0.00..1.06 rows=6 width=16) (actual time=0.001..0.001 rows=6 loops=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.559 1.113 ↓ 1.0 2,064 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 146kB
694. 0.554 0.554 ↓ 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.007..0.554 rows=2,064 loops=1)

695.          

SubPlan (for Subquery Scan)

696. 2.468 1,333.954 ↑ 1.0 1 1,234

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

697. 7.404 1,331.486 ↑ 1.5 2 1,234

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

698. 74.040 1,324.082 ↓ 2.3 7 1,234

Sort (cost=200.06..200.07 rows=3 width=151) (actual time=1.073..1.073 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. 3.702 1,250.042 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_12 (cost=200.00..200.04 rows=3 width=151) (actual time=1.010..1.013 rows=7 loops=1,234)

700. 83.912 1,246.340 ↓ 2.3 7 1,234

Sort (cost=200.00..200.01 rows=3 width=212) (actual time=1.009..1.010 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. 40.308 1,162.428 ↓ 2.3 7 1,234

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

702. 114.762 1,105.664 ↓ 2.3 7 1,234

Hash Right Join (cost=176.85..198.73 rows=3 width=195) (actual time=0.820..0.896 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. 59.232 59.232 ↑ 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.048 rows=793 loops=1,234)

704. 6.170 931.670 ↓ 2.3 7 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
705. 9.048 925.500 ↓ 2.3 7 1,234

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

706. 2.468 908.224 ↓ 2.3 7 1,234

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

707. 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_19.tipo_papel_id = tipo_papeis_15.id)
  • Rows Removed by Join Filter: 5
708. 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)

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.006..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.002..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. 11.106 883.544 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..150.20 rows=3 width=84) (actual time=0.418..0.716 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. 429.432 872.438 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_14.evento_financeiro_id = evento_financeiros_15.id)
716. 304.798 304.798 ↑ 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.247 rows=3,944 loops=1,234)

717. 2.468 138.208 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
718. 135.740 135.740 ↑ 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.055..0.110 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.008 0.008 ↑ 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.006..0.008 rows=4 loops=1)

  • Filter: saldo
  • Rows Removed by Filter: 5
721. 8.228 8.228 ↑ 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.001 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.016 5.843 ↑ 22.2 79 1

Hash (cost=996.49..996.49 rows=1,751 width=16) (actual time=5.843..5.843 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
724. 0.021 5.827 ↑ 22.2 79 1

Subquery Scan on pevr_pagamentos_1 (cost=974.60..996.49 rows=1,751 width=16) (actual time=5.805..5.827 rows=79 loops=1)

725. 0.643 5.806 ↑ 22.2 79 1

Sort (cost=974.60..978.98 rows=1,751 width=212) (actual time=5.803..5.806 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.384 5.163 ↑ 22.2 79 1

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

  • Hash Cond: (processo_principais_10.id = precatorios_13.processo_principal_id)
727. 0.136 0.136 ↓ 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.136 rows=2,064 loops=1)

728. 0.042 4.643 ↑ 22.2 79 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
729. 0.132 4.601 ↑ 22.2 79 1

Hash Right Join (cost=718.84..742.91 rows=1,751 width=195) (actual time=4.438..4.601 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.043 0.043 ↑ 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.043 rows=793 loops=1)