explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gSiC

Settings
# exclusive inclusive rows x rows loops node
1. 4.826 8,399.963 ↑ 15.5 1,494 1

Sort (cost=4,834,861.56..4,834,919.64 rows=23,231 width=1,172) (actual time=8,399.705..8,399.963 rows=1,494 loops=1)

  • Sort Key: proc_prin.numero_processo, precatorios.id DESC
  • Sort Method: quicksort Memory: 1774kB
2. 1.925 8,395.137 ↑ 15.5 1,494 1

Hash Left Join (cost=3,940,816.28..4,821,266.38 rows=23,231 width=1,172) (actual time=7,571.827..8,395.137 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = precatorios_atrasados_nao_quitados.precatorio_id)
3. 0.936 5,617.445 ↑ 15.5 1,494 1

Hash Join (cost=2,369,941.84..3,246,046.95 rows=23,231 width=1,164) (actual time=4,796.034..5,617.445 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = percentual_cadastro_quitacao_precatorio.precatorio_id)
4. 0.702 2,718.698 ↑ 15.5 1,494 1

Hash Left Join (cost=797,851.80..1,668,120.13 rows=23,231 width=1,155) (actual time=1,898.209..2,718.698 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = precatorios_1.id)
5. 0.871 2,705.102 ↑ 15.5 1,494 1

Hash Left Join (cost=797,658.55..1,667,797.88 rows=23,231 width=1,147) (actual time=1,885.301..2,705.102 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = agregacao_numero_depre.precatorio_id)
6. 2.591 2,695.286 ↑ 15.5 1,494 1

Hash Right Join (cost=797,022.18..1,661,415.01 rows=23,231 width=1,115) (actual time=1,876.338..2,695.286 rows=1,494 loops=1)

  • Hash Cond: (quitacao_saldo_precatorio.precatorios_id = precatorios.id)
7. 0.101 2,406.219 ↑ 3.0 360 1

Subquery Scan on quitacao_saldo_precatorio (cost=784,932.33..1,645,962.13 rows=1,063 width=25) (actual time=1,587.745..2,406.219 rows=360 loops=1)

8. 7.248 2,406.118 ↑ 3.0 360 1

GroupAggregate (cost=784,932.33..1,645,951.50 rows=1,063 width=65) (actual time=1,587.744..2,406.118 rows=360 loops=1)

  • Group Key: ultimos_eventos_financeiros_saldo_participantes_precatorios.numero_processo_principal, ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id, (count(precatorio_participantes_1.credor))
9. 4.767 1,586.350 ↓ 4.8 5,052 1

Sort (cost=784,932.33..784,934.99 rows=1,063 width=65) (actual time=1,585.618..1,586.350 rows=5,052 loops=1)

  • Sort Key: ultimos_eventos_financeiros_saldo_participantes_precatorios.numero_processo_principal DESC, ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id, (count(precatorio_participantes_1.credor))
  • Sort Method: quicksort Memory: 903kB
10. 0.730 1,581.583 ↓ 4.8 5,052 1

Hash Left Join (cost=784,737.08..784,878.90 rows=1,063 width=65) (actual time=1,577.823..1,581.583 rows=5,052 loops=1)

  • Hash Cond: (precatorio_participantes.orcamentario_id = orcamentarios.id)
11. 1.031 1,580.852 ↓ 4.8 5,052 1

Hash Left Join (cost=784,713.58..784,851.40 rows=1,063 width=65) (actual time=1,577.813..1,580.852 rows=5,052 loops=1)

  • Hash Cond: (precatorio_participantes.rpv_id = rpvs.id)
12. 0.862 1,579.113 ↓ 4.8 5,052 1

Hash Left Join (cost=784,636.43..784,766.63 rows=1,063 width=69) (actual time=1,577.092..1,579.113 rows=5,052 loops=1)

  • Hash Cond: (precatorios_2.id = precatorio_participantes.precatorio_id)
13. 0.308 1,576.150 ↓ 2.2 596 1

Hash Right Join (cost=784,349.14..784,441.44 rows=266 width=61) (actual time=1,574.965..1,576.150 rows=596 loops=1)

  • Hash Cond: (precatorios_2.id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
14. 0.671 10.019 ↑ 1.8 1,472 1

GroupAggregate (cost=736.64..789.76 rows=2,656 width=34) (actual time=9.122..10.019 rows=1,472 loops=1)

  • Group Key: processo_principais_1.numero_processo, precatorios_2.id
15. 4.149 9.348 ↑ 1.0 2,656 1

Sort (cost=736.64..743.28 rows=2,656 width=34) (actual time=9.115..9.348 rows=2,656 loops=1)

  • Sort Key: processo_principais_1.numero_processo, precatorios_2.id
  • Sort Method: quicksort Memory: 304kB
16. 0.743 5.199 ↑ 1.0 2,656 1

Hash Join (cost=319.30..585.58 rows=2,656 width=34) (actual time=2.694..5.199 rows=2,656 loops=1)

  • Hash Cond: (precatorio_participantes_1.participante_id = participantes_1.id)
17. 0.626 3.597 ↑ 1.0 2,656 1

Hash Join (cost=189.60..419.37 rows=2,656 width=42) (actual time=1.821..3.597 rows=2,656 loops=1)

  • Hash Cond: (precatorio_participantes_1.precatorio_id = precatorios_2.id)
18. 1.165 1.165 ↑ 1.0 2,656 1

Seq Scan on precatorio_participantes precatorio_participantes_1 (cost=0.00..193.24 rows=2,656 width=17) (actual time=0.004..1.165 rows=2,656 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4868
19. 0.342 1.806 ↑ 1.0 1,908 1

Hash (cost=165.75..165.75 rows=1,908 width=33) (actual time=1.806..1.806 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
20. 0.573 1.464 ↑ 1.0 1,908 1

Hash Join (cost=78.44..165.75 rows=1,908 width=33) (actual time=0.667..1.464 rows=1,908 loops=1)

  • Hash Cond: (precatorios_2.processo_principal_id = processo_principais_1.id)
21. 0.239 0.239 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_2 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.004..0.239 rows=1,908 loops=1)

22. 0.303 0.652 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=0.652..0.652 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
23. 0.349 0.349 ↑ 1.0 2,064 1

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

24. 0.391 0.859 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=8) (actual time=0.859..0.859 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 155kB
25. 0.468 0.468 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_1 (cost=0.00..90.42 rows=3,142 width=8) (actual time=0.007..0.468 rows=3,142 loops=1)

26. 0.123 1,565.823 ↓ 29.8 596 1

Hash (cost=783,612.25..783,612.25 rows=20 width=45) (actual time=1,565.823..1,565.823 rows=596 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 57kB
27. 0.096 1,565.700 ↓ 29.8 596 1

Subquery Scan on ultimos_eventos_financeiros_saldo_participantes_precatorios (cost=783,612.00..783,612.25 rows=20 width=45) (actual time=1,565.555..1,565.700 rows=596 loops=1)

28. 1.354 1,565.604 ↓ 29.8 596 1

Sort (cost=783,612.00..783,612.05 rows=20 width=73) (actual time=1,565.554..1,565.604 rows=596 loops=1)

  • Sort Key: tab1.numero_processo_principal DESC, tab1.participantes_nome
  • Sort Method: quicksort Memory: 115kB
29. 3.420 1,564.250 ↓ 29.8 596 1

Subquery Scan on tab1 (cost=1,641.59..783,611.57 rows=20 width=73) (actual time=107.787..1,564.250 rows=596 loops=1)

  • Filter: (tab1.data_evento_id = (SubPlan 4))
  • Rows Removed by Filter: 638
30. 3.238 99.774 ↑ 3.2 1,234 1

GroupAggregate (cost=1,641.59..1,828.93 rows=3,944 width=151) (actual time=95.544..99.774 rows=1,234 loops=1)

  • Group 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
31. 13.322 96.536 ↑ 1.0 3,944 1

Sort (cost=1,641.59..1,651.45 rows=3,944 width=151) (actual time=95.518..96.536 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
32. 2.507 83.214 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas (cost=1,356.73..1,406.03 rows=3,944 width=151) (actual time=79.414..83.214 rows=3,944 loops=1)

33. 27.810 80.707 ↑ 1.0 3,944 1

Sort (cost=1,356.73..1,366.59 rows=3,944 width=141) (actual time=79.407..80.707 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: 1167kB
34. 17.335 52.897 ↑ 1.0 3,944 1

Hash Join (cost=963.72..1,121.16 rows=3,944 width=141) (actual time=31.260..52.897 rows=3,944 loops=1)

  • Hash Cond: (precatorios_3.processo_principal_id = processo_principais_2.id)
35. 4.118 33.859 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=124) (actual time=29.492..33.859 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))
36. 0.316 0.316 ↑ 1.0 793 1

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

37. 4.913 29.425 ↑ 1.0 3,944 1

Hash (cost=826.12..826.12 rows=3,944 width=128) (actual time=29.425..29.425 rows=3,944 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 724kB
38. 3.406 24.512 ↑ 1.0 3,944 1

Hash Join (cost=619.22..826.12 rows=3,944 width=128) (actual time=14.882..24.512 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos.tipo_rubrica_id = tipo_rubricas.id)
39. 4.893 21.051 ↑ 1.0 3,944 1

Hash Join (cost=617.44..770.11 rows=3,944 width=126) (actual time=14.808..21.051 rows=3,944 loops=1)

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

Seq Scan on rubrica_eventos (cost=0.00..98.44 rows=3,944 width=24) (actual time=0.010..1.380 rows=3,944 loops=1)

41. 1.250 14.778 ↑ 1.0 1,234 1

Hash (cost=602.01..602.01 rows=1,234 width=110) (actual time=14.778..14.778 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
42. 0.978 13.528 ↑ 1.0 1,234 1

Hash Join (cost=262.73..602.01 rows=1,234 width=110) (actual time=5.415..13.528 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_2.tipo_papel_id = tipo_papeis_1.id)
43. 0.971 12.539 ↑ 1.0 1,234 1

Hash Join (cost=261.59..583.91 rows=1,234 width=110) (actual time=5.393..12.539 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_2.participante_id = participantes_2.id)
44. 0.931 8.910 ↑ 1.0 1,234 1

Hash Join (cost=131.90..437.25 rows=1,234 width=82) (actual time=2.718..8.910 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_2.precatorio_id = precatorios_3.id)
45. 0.901 6.550 ↑ 1.0 1,234 1

Hash Join (cost=46.97..335.35 rows=1,234 width=74) (actual time=1.266..6.550 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros.tipo_evento_financeiro_id = tipo_evento_financeiros.id)
46. 2.614 5.630 ↑ 1.0 1,234 1

Hash Join (cost=45.77..317.18 rows=1,234 width=60) (actual time=1.228..5.630 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_2.id = evento_financeiros.precatorio_participante_id)
47. 1.836 1.836 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_2 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.007..1.836 rows=7,524 loops=1)

48. 0.561 1.180 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=36) (actual time=1.180..1.180 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
49. 0.619 0.619 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros (cost=0.00..30.34 rows=1,234 width=36) (actual time=0.010..0.619 rows=1,234 loops=1)

50. 0.005 0.019 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=30) (actual time=0.019..0.019 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
51. 0.014 0.014 ↑ 1.0 9 1

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

52. 0.626 1.429 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=1.429..1.429 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
53. 0.803 0.803 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_3 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.008..0.803 rows=1,908 loops=1)

54. 1.418 2.658 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=2.658..2.658 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 242kB
55. 1.240 1.240 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_2 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.009..1.240 rows=3,142 loops=1)

56. 0.004 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: 9kB
57. 0.007 0.007 ↑ 1.0 6 1

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

58. 0.022 0.055 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=10) (actual time=0.055..0.055 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
59. 0.033 0.033 ↑ 1.0 35 1

Seq Scan on tipo_rubricas (cost=0.00..1.35 rows=35 width=10) (actual time=0.018..0.033 rows=35 loops=1)

60. 0.835 1.703 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=1.703..1.703 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
61. 0.868 0.868 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_2 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.020..0.868 rows=2,064 loops=1)

62.          

SubPlan (for Subquery Scan)

63. 3.702 1,461.056 ↑ 1.0 1 1,234

Aggregate (cost=198.20..198.21 rows=1 width=32) (actual time=1.184..1.184 rows=1 loops=1,234)

64. 8.638 1,457.354 ↑ 1.5 2 1,234

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.178..1.181 rows=2 loops=1,234)

  • Group 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
65. 24.680 1,448.716 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.174..1.174 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
66. 3.702 1,424.036 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_8 (cost=197.96..198.00 rows=3 width=143) (actual time=1.151..1.154 rows=7 loops=1,234)

67. 28.382 1,420.334 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.150..1.151 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: 25kB
68. 33.314 1,391.952 ↓ 2.3 7 1,234

Nested Loop (cost=175.11..197.94 rows=3 width=131) (actual time=1.005..1.128 rows=7 loops=1,234)

69. 128.336 1,333.954 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.990..1.081 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))
70. 77.742 77.742 ↑ 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.003..0.063 rows=793 loops=1,234)

71. 6.170 1,127.876 ↓ 2.3 7 1,234

Hash (cost=174.79..174.79 rows=3 width=118) (actual time=0.914..0.914 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
72. 5.756 1,121.706 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..174.79 rows=3 width=118) (actual time=0.525..0.909 rows=7 loops=1,234)

73. 2.468 1,099.494 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..174.28 rows=3 width=118) (actual time=0.518..0.891 rows=7 loops=1,234)

74. 3.702 25.914 ↑ 1.0 1 1,234

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

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

Nested Loop (cost=0.84..24.91 rows=1 width=68) (actual time=0.014..0.016 rows=1 loops=1,234)

76. 3.702 14.808 ↑ 1.0 1 1,234

Nested Loop (cost=0.56..16.61 rows=1 width=40) (actual time=0.011..0.012 rows=1 loops=1,234)

77. 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=32) (actual time=0.006..0.006 rows=1 loops=1,234)

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

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

  • Index Cond: (id = precatorio_participantes_15.precatorio_id)
79. 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)
80. 2.468 2.468 ↑ 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.002 rows=6 loops=1,234)

81. 14.808 1,071.112 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.499..0.868 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
82. 475.090 1,056.304 ↓ 1.2 7 1,234

Hash Join (cost=33.45..146.74 rows=6 width=44) (actual time=0.496..0.856 rows=7 loops=1,234)

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

Seq Scan on rubrica_eventos rubrica_eventos_10 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.323 rows=3,944 loops=1,234)

84. 3.702 182.632 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
85. 178.930 178.930 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_11 (cost=0.00..33.42 rows=2 width=36) (actual time=0.070..0.145 rows=2 loops=1,234)

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

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

87. 0.012 0.012 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_11 (cost=0.00..1.09 rows=4 width=30) (actual time=0.008..0.012 rows=4 loops=1)

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

Index Only Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_10 (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_10.tipo_rubrica_id)
  • Heap Fetches: 8228
89. 24.684 24.684 ↑ 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.003 rows=1 loops=8,228)

  • Index Cond: (id = precatorios_16.processo_principal_id)
90. 0.986 2.101 ↑ 1.0 7,524 1

Hash (cost=193.24..193.24 rows=7,524 width=24) (actual time=2.101..2.101 rows=7,524 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 379kB
91. 1.115 1.115 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes (cost=0.00..193.24 rows=7,524 width=24) (actual time=0.005..1.115 rows=7,524 loops=1)

92. 0.260 0.708 ↑ 1.0 2,140 1

Hash (cost=50.40..50.40 rows=2,140 width=12) (actual time=0.708..0.708 rows=2,140 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 133kB
93. 0.448 0.448 ↑ 1.0 2,140 1

Seq Scan on rpvs (cost=0.00..50.40 rows=2,140 width=12) (actual time=0.006..0.448 rows=2,140 loops=1)

94. 0.000 0.001 ↓ 0.0 0 1

Hash (cost=16.00..16.00 rows=600 width=16) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
95. 0.001 0.001 ↓ 0.0 0 1

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

96.          

SubPlan (for GroupAggregate)

97. 0.720 812.520 ↑ 1.0 1 360

Aggregate (cost=809.88..809.89 rows=1 width=1) (actual time=2.257..2.257 rows=1 loops=360)

98. 1.800 811.800 ↓ 0.0 0 360

Sort (cost=809.87..809.87 rows=1 width=61) (actual time=2.255..2.255 rows=0 loops=360)

  • Sort Key: tab1_5.numero_processo_principal DESC, tab1_5.participantes_nome
  • Sort Method: quicksort Memory: 25kB
99. 0.400 810.000 ↓ 0.0 0 360

Subquery Scan on tab1_5 (cost=413.31..809.86 rows=1 width=61) (actual time=2.218..2.250 rows=0 loops=360)

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

GroupAggregate (cost=413.31..413.41 rows=2 width=151) (actual time=2.185..2.186 rows=0 loops=360)

  • Group 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
  • Filter: CASE WHEN (sum(precatorios_eventos_rubricas_7.valor_com_sinal) <= '0'::double precision) THEN true ELSE false END
  • Rows Removed by Filter: 3
101. 8.280 783.720 ↓ 5.5 11 360

Sort (cost=413.31..413.31 rows=2 width=151) (actual time=2.176..2.177 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
102. 1.800 775.440 ↓ 5.5 11 360

Subquery Scan on precatorios_eventos_rubricas_7 (cost=413.27..413.30 rows=2 width=151) (actual time=2.149..2.154 rows=11 loops=360)

103. 12.600 773.640 ↓ 5.5 11 360

Sort (cost=413.27..413.28 rows=2 width=141) (actual time=2.148..2.149 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: 56kB
104. 15.984 761.040 ↓ 5.5 11 360

Nested Loop Left Join (cost=257.40..413.26 rows=2 width=141) (actual time=1.656..2.114 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
105. 2.192 709.560 ↓ 5.5 11 360

Nested Loop (cost=257.40..395.24 rows=2 width=145) (actual time=1.594..1.971 rows=11 loops=360)

106. 1.440 699.480 ↓ 5.5 11 360

Nested Loop (cost=257.12..378.62 rows=2 width=128) (actual time=1.589..1.943 rows=11 loops=360)

107. 2.520 2.520 ↑ 1.0 1 360

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

  • Index Cond: (id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
108. 5.072 695.520 ↓ 5.5 11 360

Nested Loop (cost=256.84..370.31 rows=2 width=120) (actual time=1.581..1.932 rows=11 loops=360)

109. 137.880 682.560 ↓ 5.5 11 360

Hash Join (cost=256.70..369.96 rows=2 width=118) (actual time=1.573..1.896 rows=11 loops=360)

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

Seq Scan on rubrica_eventos rubrica_eventos_9 (cost=0.00..98.44 rows=3,944 width=24) (actual time=0.002..0.307 rows=3,944 loops=360)

111. 1.440 434.160 ↓ 3.0 3 360

Hash (cost=256.69..256.69 rows=1 width=102) (actual time=1.206..1.206 rows=3 loops=360)

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

Nested Loop (cost=212.52..256.69 rows=1 width=102) (actual time=1.078..1.202 rows=3 loops=360)

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

Nested Loop (cost=212.52..255.56 rows=1 width=102) (actual time=1.073..1.190 rows=3 loops=360)

114. 2.572 424.440 ↓ 3.0 3 360

Nested Loop (cost=212.24..247.25 rows=1 width=74) (actual time=1.068..1.179 rows=3 loops=360)

115. 43.920 419.400 ↓ 3.0 3 360

Hash Join (cost=212.10..247.08 rows=1 width=60) (actual time=1.060..1.165 rows=3 loops=360)

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

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

117. 1.440 340.200 ↑ 1.0 4 360

Hash (cost=212.05..212.05 rows=4 width=32) (actual time=0.945..0.945 rows=4 loops=360)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
118. 338.760 338.760 ↑ 1.0 4 360

Seq Scan on precatorio_participantes precatorio_participantes_14 (cost=0.00..212.05 rows=4 width=32) (actual time=0.176..0.941 rows=4 loops=360)

  • Filter: (precatorio_id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
  • Rows Removed by Filter: 7520
119. 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=30) (actual time=0.002..0.002 rows=1 loops=1,234)

  • Index Cond: (id = evento_financeiros_10.tipo_evento_financeiro_id)
120. 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)
121. 1.234 1.234 ↑ 1.0 6 1,234

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

122. 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=10) (actual time=0.002..0.002 rows=1 loops=3,944)

  • Index Cond: (id = rubrica_eventos_9.tipo_rubrica_id)
123. 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.002..0.002 rows=1 loops=3,944)

  • Index Cond: (id = precatorios_15.processo_principal_id)
124. 3.816 35.496 ↓ 2.5 5 3,944

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

125. 31.680 31.680 ↑ 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.049..0.088 rows=2 loops=360)

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

SubPlan (for Subquery Scan)

127. 0.100 22.640 ↑ 1.0 1 20

Aggregate (cost=198.20..198.21 rows=1 width=32) (actual time=1.132..1.132 rows=1 loops=20)

128. 0.200 22.540 ↑ 1.0 3 20

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.122..1.127 rows=3 loops=20)

  • Group 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
129. 0.600 22.340 ↓ 4.0 12 20

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.116..1.117 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
130. 0.080 21.740 ↓ 4.0 12 20

Subquery Scan on precatorios_eventos_rubricas_6 (cost=197.96..198.00 rows=3 width=143) (actual time=1.083..1.087 rows=12 loops=20)

131. 0.820 21.660 ↓ 4.0 12 20

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.081..1.083 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: 32kB
132. 0.818 20.840 ↓ 4.0 12 20

Nested Loop (cost=175.11..197.94 rows=3 width=131) (actual time=0.863..1.042 rows=12 loops=20)

133. 1.980 19.540 ↓ 4.0 12 20

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.846..0.977 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))
134. 1.100 1.100 ↑ 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.003..0.055 rows=793 loops=20)

135. 0.140 16.460 ↓ 4.0 12 20

Hash (cost=174.79..174.79 rows=3 width=118) (actual time=0.823..0.823 rows=12 loops=20)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
136. 0.259 16.320 ↓ 4.0 12 20

Nested Loop (cost=34.43..174.79 rows=3 width=118) (actual time=0.216..0.816 rows=12 loops=20)

137. 0.080 15.820 ↓ 4.0 12 20

Nested Loop (cost=34.29..174.28 rows=3 width=118) (actual time=0.210..0.791 rows=12 loops=20)

138. 0.060 0.460 ↑ 1.0 1 20

Nested Loop (cost=0.84..26.05 rows=1 width=68) (actual time=0.020..0.023 rows=1 loops=20)

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

Nested Loop (cost=0.84..24.91 rows=1 width=68) (actual time=0.016..0.018 rows=1 loops=20)

140. 0.080 0.260 ↑ 1.0 1 20

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

141. 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=32) (actual time=0.007..0.007 rows=1 loops=20)

  • Index Cond: (id = tab1_5.precatorio_participantes_id)
142. 0.040 0.040 ↑ 1.0 1 20

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

  • Index Cond: (id = precatorio_participantes_13.precatorio_id)
143. 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)
144. 0.040 0.040 ↑ 1.0 6 20

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

145. 0.400 15.280 ↓ 4.0 12 20

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.188..0.764 rows=12 loops=20)

  • Join Filter: (evento_financeiros_9.tipo_evento_financeiro_id = tipo_evento_financeiros_9.id)
  • Rows Removed by Join Filter: 52
146. 6.780 14.880 ↓ 2.7 16 20

Hash Join (cost=33.45..146.74 rows=6 width=44) (actual time=0.182..0.744 rows=16 loops=20)

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

Seq Scan on rubrica_eventos rubrica_eventos_8 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.003..0.276 rows=3,944 loops=20)

148. 0.060 2.580 ↓ 2.0 4 20

Hash (cost=33.42..33.42 rows=2 width=36) (actual time=0.129..0.129 rows=4 loops=20)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
149. 2.520 2.520 ↓ 2.0 4 20

Seq Scan on evento_financeiros evento_financeiros_9 (cost=0.00..33.42 rows=2 width=36) (actual time=0.013..0.126 rows=4 loops=20)

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

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

151. 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=30) (actual time=0.003..0.004 rows=4 loops=1)

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

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

  • Index Cond: (id = rubrica_eventos_8.tipo_rubrica_id)
  • Heap Fetches: 241
153. 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)
154. 6.495 286.476 ↑ 15.5 1,494 1

Hash (cost=8,600.46..8,600.46 rows=23,231 width=1,098) (actual time=286.476..286.476 rows=1,494 loops=1)

  • Buckets: 16384 Batches: 2 Memory Usage: 565kB
155. 3.869 279.981 ↑ 15.5 1,494 1

Hash Right Join (cost=7,869.68..8,600.46 rows=23,231 width=1,098) (actual time=261.845..279.981 rows=1,494 loops=1)

  • Hash Cond: (precatorios_4.id = precatorios.id)
156. 11.800 70.899 ↑ 4.0 1,882 1

GroupAggregate (cost=1,203.89..1,580.09 rows=7,524 width=87) (actual time=56.590..70.899 rows=1,882 loops=1)

  • Group Key: processo_principais_3.numero_processo, precatorios_4.id
157. 35.804 59.099 ↑ 1.0 7,524 1

Sort (cost=1,203.89..1,222.70 rows=7,524 width=87) (actual time=56.543..59.099 rows=7,524 loops=1)

  • Sort Key: processo_principais_3.numero_processo, precatorios_4.id
  • Sort Method: quicksort Memory: 1271kB
158. 5.972 23.295 ↑ 1.0 7,524 1

Hash Join (cost=319.30..719.45 rows=7,524 width=87) (actual time=8.830..23.295 rows=7,524 loops=1)

  • Hash Cond: (precatorio_participantes_3.participante_id = participantes_3.id)
159. 6.197 13.982 ↑ 1.0 7,524 1

Hash Join (cost=189.60..486.30 rows=7,524 width=41) (actual time=5.465..13.982 rows=7,524 loops=1)

  • Hash Cond: (precatorio_participantes_3.precatorio_id = precatorios_4.id)
160. 2.355 2.355 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_3 (cost=0.00..193.24 rows=7,524 width=16) (actual time=0.008..2.355 rows=7,524 loops=1)

161. 0.935 5.430 ↑ 1.0 1,908 1

Hash (cost=165.75..165.75 rows=1,908 width=33) (actual time=5.430..5.430 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
162. 1.796 4.495 ↑ 1.0 1,908 1

Hash Join (cost=78.44..165.75 rows=1,908 width=33) (actual time=2.065..4.495 rows=1,908 loops=1)

  • Hash Cond: (precatorios_4.processo_principal_id = processo_principais_3.id)
163. 0.680 0.680 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_4 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.008..0.680 rows=1,908 loops=1)

164. 1.029 2.019 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=2.019..2.019 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
165. 0.990 0.990 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_3 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.010..0.990 rows=2,064 loops=1)

166. 1.716 3.341 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=62) (actual time=3.341..3.341 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 293kB
167. 1.625 1.625 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_3 (cost=0.00..90.42 rows=3,142 width=62) (actual time=0.019..1.625 rows=3,142 loops=1)

168. 3.797 205.213 ↑ 3.9 1,494 1

Hash (cost=6,592.15..6,592.15 rows=5,891 width=970) (actual time=205.213..205.213 rows=1,494 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 748kB
169. 1.778 201.416 ↑ 3.9 1,494 1

Hash Join (cost=5,545.77..6,592.15 rows=5,891 width=970) (actual time=141.517..201.416 rows=1,494 loops=1)

  • Hash Cond: (precatorios.tipo_origem_informacao_id = tipo_origem_informacoes.id)
170. 1.194 199.614 ↑ 3.9 1,494 1

Hash Left Join (cost=5,544.68..6,510.06 rows=5,891 width=953) (actual time=141.482..199.614 rows=1,494 loops=1)

  • Hash Cond: (precatorios.modo_lancamento_valor_id = modo_lancamento_valores.id)
171. 1.631 198.413 ↑ 3.9 1,494 1

Hash Left Join (cost=5,543.64..6,475.68 rows=5,891 width=945) (actual time=141.462..198.413 rows=1,494 loops=1)

  • Hash Cond: ((max(prec_part_1.categoria_precatorio_id)) = categoria_precatorios.id)
172. 3.297 196.764 ↑ 3.9 1,494 1

Hash Right Join (cost=5,542.59..6,451.96 rows=5,891 width=931) (actual time=141.422..196.764 rows=1,494 loops=1)

  • Hash Cond: (precatorios_5.id = precatorios.id)
173. 49.535 86.216 ↑ 1.0 1,882 1

GroupAggregate (cost=1,262.84..2,082.29 rows=1,908 width=64) (actual time=34.116..86.216 rows=1,882 loops=1)

  • Group Key: precatorios_5.id
174. 8.081 36.681 ↓ 1.0 7,787 1

Sort (cost=1,262.84..1,281.65 rows=7,524 width=64) (actual time=34.004..36.681 rows=7,787 loops=1)

  • Sort Key: precatorios_5.id
  • Sort Method: quicksort Memory: 680kB
175. 4.448 28.600 ↓ 1.0 7,787 1

Hash Left Join (cost=577.12..778.40 rows=7,524 width=64) (actual time=15.414..28.600 rows=7,787 loops=1)

  • Hash Cond: (precatorio_participantes_4.rpv_id = rpvs_1.id)
176. 4.919 22.192 ↓ 1.0 7,787 1

Hash Join (cost=499.97..647.25 rows=7,524 width=48) (actual time=13.418..22.192 rows=7,787 loops=1)

  • Hash Cond: (precatorio_participantes_4.precatorio_id = precatorios_5.id)
177. 3.488 16.055 ↓ 1.0 7,787 1

Hash Right Join (cost=415.04..458.87 rows=7,524 width=48) (actual time=12.177..16.055 rows=7,787 loops=1)

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

  • Filter: (NOT preferencial)
  • Rows Removed by Filter: 306
179. 3.016 12.103 ↑ 1.0 7,524 1

Hash (cost=320.99..320.99 rows=7,524 width=40) (actual time=12.103..12.103 rows=7,524 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 441kB
180. 3.080 9.087 ↑ 1.0 7,524 1

Hash Right Join (cost=287.29..320.99 rows=7,524 width=40) (actual time=5.723..9.087 rows=7,524 loops=1)

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

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

  • Filter: preferencial
  • Rows Removed by Filter: 1043
182. 2.700 5.620 ↑ 1.0 7,524 1

Hash (cost=193.24..193.24 rows=7,524 width=32) (actual time=5.620..5.620 rows=7,524 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 437kB
183. 2.920 2.920 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_4 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.010..2.920 rows=7,524 loops=1)

184. 0.562 1.218 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=8) (actual time=1.218..1.218 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 91kB
185. 0.656 0.656 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_5 (cost=0.00..61.08 rows=1,908 width=8) (actual time=0.016..0.656 rows=1,908 loops=1)

186. 0.919 1.960 ↑ 1.0 2,140 1

Hash (cost=50.40..50.40 rows=2,140 width=32) (actual time=1.960..1.960 rows=2,140 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
187. 1.041 1.041 ↑ 1.0 2,140 1

Seq Scan on rpvs rpvs_1 (cost=0.00..50.40 rows=2,140 width=32) (actual time=0.012..1.041 rows=2,140 loops=1)

188. 2.509 107.251 ↑ 3.9 1,494 1

Hash (cost=4,206.11..4,206.11 rows=5,891 width=547) (actual time=107.251..107.251 rows=1,494 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 559kB
189. 1.704 104.742 ↑ 3.9 1,494 1

Hash Right Join (cost=4,088.58..4,206.11 rows=5,891 width=547) (actual time=103.048..104.742 rows=1,494 loops=1)

  • Hash Cond: (precatorios_eventos_rubricas_1.precatorios_id = precatorios.id)
190. 0.054 13.636 ↑ 175.1 10 1

GroupAggregate (cost=1,054.02..1,089.04 rows=1,751 width=41) (actual time=13.603..13.636 rows=10 loops=1)

  • Group Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
191. 0.108 13.582 ↑ 22.2 79 1

Sort (cost=1,054.02..1,058.40 rows=1,751 width=41) (actual time=13.572..13.582 rows=79 loops=1)

  • Sort Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
  • Sort Method: quicksort Memory: 31kB
192. 0.036 13.474 ↑ 22.2 79 1

Subquery Scan on precatorios_eventos_rubricas_1 (cost=937.81..959.69 rows=1,751 width=41) (actual time=13.424..13.474 rows=79 loops=1)

193. 0.422 13.438 ↑ 22.2 79 1

Sort (cost=937.81..942.18 rows=1,751 width=95) (actual time=13.421..13.438 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: 40kB
194. 0.611 13.016 ↑ 22.2 79 1

Hash Join (cost=756.84..843.48 rows=1,751 width=95) (actual time=12.026..13.016 rows=79 loops=1)

  • Hash Cond: (processo_principais_4.id = precatorios_6.processo_principal_id)
195. 0.438 0.438 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_4 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.017..0.438 rows=2,064 loops=1)

196. 0.042 11.967 ↑ 22.2 79 1

Hash (cost=734.95..734.95 rows=1,751 width=78) (actual time=11.967..11.967 rows=79 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 26kB
197. 0.312 11.925 ↑ 22.2 79 1

Hash Right Join (cost=712.86..734.95 rows=1,751 width=78) (actual time=11.501..11.925 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))
198. 0.158 0.158 ↑ 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.009..0.158 rows=793 loops=1)

199. 0.091 11.455 ↑ 22.2 79 1

Hash (cost=686.60..686.60 rows=1,751 width=82) (actual time=11.455..11.455 rows=79 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 26kB
200. 0.068 11.364 ↑ 22.2 79 1

Hash Join (cost=531.78..686.60 rows=1,751 width=82) (actual time=9.250..11.364 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_1.tipo_rubrica_id = tipo_rubricas_1.id)
201. 1.023 11.238 ↑ 22.2 79 1

Hash Join (cost=529.99..660.73 rows=1,751 width=80) (actual time=9.177..11.238 rows=79 loops=1)

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

Seq Scan on rubrica_eventos rubrica_eventos_1 (cost=0.00..98.44 rows=3,944 width=24) (actual time=0.013..1.077 rows=3,944 loops=1)

203. 0.030 9.138 ↑ 27.4 20 1

Hash (cost=523.14..523.14 rows=548 width=64) (actual time=9.138..9.138 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
204. 0.039 9.108 ↑ 27.4 20 1

Hash Join (cost=264.20..523.14 rows=548 width=64) (actual time=5.673..9.108 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.tipo_papel_id = tipo_papeis_2.id)
205. 0.037 9.049 ↑ 27.4 20 1

Hash Join (cost=263.06..514.47 rows=548 width=64) (actual time=5.638..9.049 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.participante_id = participantes_4.id)
206. 0.043 5.735 ↑ 27.4 20 1

Hash Join (cost=133.37..377.24 rows=548 width=44) (actual time=2.338..5.735 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.precatorio_id = precatorios_6.id)
207. 1.751 3.973 ↑ 27.4 20 1

Hash Join (cost=48.44..284.78 rows=548 width=36) (actual time=0.597..3.973 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_5.id = evento_financeiros_1.precatorio_participante_id)
208. 1.686 1.686 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_5 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.007..1.686 rows=7,524 loops=1)

209. 0.009 0.536 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
210. 0.305 0.527 ↑ 27.4 20 1

Hash Join (cost=1.14..41.59 rows=548 width=20) (actual time=0.039..0.527 rows=20 loops=1)

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

Seq Scan on evento_financeiros evento_financeiros_1 (cost=0.00..30.34 rows=1,234 width=28) (actual time=0.007..0.207 rows=1,234 loops=1)

212. 0.007 0.015 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
213. 0.008 0.008 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_1 (cost=0.00..1.09 rows=4 width=8) (actual time=0.006..0.008 rows=4 loops=1)

  • Filter: pagamento
  • Rows Removed by Filter: 5
214. 0.804 1.719 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=1.719..1.719 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
215. 0.915 0.915 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_6 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.009..0.915 rows=1,908 loops=1)

216. 1.768 3.277 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=3.277..3.277 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 252kB
217. 1.509 1.509 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_4 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.016..1.509 rows=3,142 loops=1)

218. 0.010 0.020 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
219. 0.010 0.010 ↑ 1.0 6 1

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

220. 0.026 0.058 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=10) (actual time=0.058..0.058 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
221. 0.032 0.032 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_1 (cost=0.00..1.35 rows=35 width=10) (actual time=0.015..0.032 rows=35 loops=1)

222. 2.523 89.402 ↑ 3.9 1,494 1

Hash (cost=2,960.92..2,960.92 rows=5,891 width=539) (actual time=89.402..89.402 rows=1,494 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 559kB
223. 1.796 86.879 ↑ 3.9 1,494 1

Hash Right Join (cost=2,946.81..2,960.92 rows=5,891 width=539) (actual time=85.119..86.879 rows=1,494 loops=1)

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

HashAggregate (cost=228.13..230.60 rows=247 width=8) (actual time=0.844..0.844 rows=0 loops=1)

  • Group Key: precatorio_participantes_6.precatorio_id, true
225. 0.002 0.840 ↓ 0.0 0 1

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

226. 0.365 0.838 ↓ 0.0 0 1

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

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

228. 0.005 0.023 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
229. 0.018 0.018 ↑ 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.015..0.018 rows=1 loops=1)

  • Filter: sequestro
  • Rows Removed by Filter: 8
230. 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)
231. 2.662 84.239 ↑ 3.9 1,494 1

Hash (cost=2,645.04..2,645.04 rows=5,891 width=531) (actual time=84.239..84.239 rows=1,494 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 559kB
232. 3.008 81.577 ↑ 3.9 1,494 1

Hash Right Join (cost=2,313.39..2,645.04 rows=5,891 width=531) (actual time=64.885..81.577 rows=1,494 loops=1)

  • Hash Cond: (prec_part_1.precatorio_id = precatorios.id)
233. 11.960 42.920 ↑ 4.0 1,882 1

GroupAggregate (cost=1,263.12..1,432.41 rows=7,524 width=63) (actual time=29.208..42.920 rows=1,882 loops=1)

  • Group Key: prec_part_1.precatorio_id, proc.numero_processo
234. 8.384 30.960 ↑ 1.0 7,524 1

Sort (cost=1,263.12..1,281.93 rows=7,524 width=63) (actual time=29.160..30.960 rows=7,524 loops=1)

  • Sort Key: prec_part_1.precatorio_id, proc.numero_processo
  • Sort Method: quicksort Memory: 968kB
235. 4.662 22.576 ↑ 1.0 7,524 1

Hash Join (cost=320.35..778.68 rows=7,524 width=63) (actual time=6.136..22.576 rows=7,524 loops=1)

  • Hash Cond: (prec_part_1.participante_id = participantes_5.id)
236. 2.977 16.072 ↑ 1.0 7,524 1

Hash Left Join (cost=190.65..545.53 rows=7,524 width=71) (actual time=4.258..16.072 rows=7,524 loops=1)

  • Hash Cond: (prec_part_1.categoria_precatorio_id = cat.id)
237. 7.004 13.085 ↑ 1.0 7,524 1

Hash Join (cost=189.60..486.30 rows=7,524 width=49) (actual time=4.217..13.085 rows=7,524 loops=1)

  • Hash Cond: (prec_part_1.precatorio_id = prec.id)
238. 1.897 1.897 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes prec_part_1 (cost=0.00..193.24 rows=7,524 width=24) (actual time=0.006..1.897 rows=7,524 loops=1)

239. 0.736 4.184 ↑ 1.0 1,908 1

Hash (cost=165.75..165.75 rows=1,908 width=33) (actual time=4.184..4.184 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
240. 1.448 3.448 ↑ 1.0 1,908 1

Hash Join (cost=78.44..165.75 rows=1,908 width=33) (actual time=1.510..3.448 rows=1,908 loops=1)

  • Hash Cond: (prec.processo_principal_id = proc.id)
241. 0.524 0.524 ↑ 1.0 1,908 1

Seq Scan on precatorios prec (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.008..0.524 rows=1,908 loops=1)

242. 0.721 1.476 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=1.476..1.476 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
243. 0.755 0.755 ↑ 1.0 2,064 1

Seq Scan on processo_principais proc (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.009..0.755 rows=2,064 loops=1)

244. 0.003 0.010 ↑ 1.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
245. 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.005..0.007 rows=2 loops=1)

246. 0.807 1.842 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=8) (actual time=1.842..1.842 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 155kB
247. 1.035 1.035 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_5 (cost=0.00..90.42 rows=3,142 width=8) (actual time=0.011..1.035 rows=3,142 loops=1)

248. 1.942 35.649 ↑ 1.0 1,494 1

Hash (cost=1,031.59..1,031.59 rows=1,494 width=515) (actual time=35.649..35.649 rows=1,494 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 485kB
249. 0.994 33.707 ↑ 1.0 1,494 1

Hash Left Join (cost=813.15..1,031.59 rows=1,494 width=515) (actual time=27.809..33.707 rows=1,494 loops=1)

  • Hash Cond: (precatorios.fase_id = fases.id)
250. 0.759 32.704 ↑ 1.0 1,494 1

Hash Left Join (cost=812.08..1,017.18 rows=1,494 width=503) (actual time=27.789..32.704 rows=1,494 loops=1)

  • Hash Cond: (precatorios.detalhe_natureza_precatorio_id = detalhe_natureza_precatorios.id)
251. 1.395 31.936 ↑ 1.0 1,494 1

Hash Right Join (cost=811.01..1,010.50 rows=1,494 width=484) (actual time=27.766..31.936 rows=1,494 loops=1)

  • Hash Cond: (prec_part.precatorio_id = precatorios.id)
252. 0.111 5.257 ↑ 1.0 160 1

Hash Left Join (cost=130.83..328.47 rows=160 width=60) (actual time=2.465..5.257 rows=160 loops=1)

  • Hash Cond: (prec_part.tipo_papel_id = tipo_papeis.id)
253. 0.160 5.132 ↑ 1.0 160 1

Hash Left Join (cost=129.69..325.13 rows=160 width=52) (actual time=2.420..5.132 rows=160 loops=1)

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

Seq Scan on precatorio_participantes prec_part (cost=0.00..193.24 rows=160 width=24) (actual time=0.025..2.617 rows=160 loops=1)

  • Filter: (encabecante IS TRUE)
  • Rows Removed by Filter: 7364
255. 1.189 2.355 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=2.355..2.355 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 252kB
256. 1.166 1.166 ↑ 1.0 3,142 1

Seq Scan on participantes (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.008..1.166 rows=3,142 loops=1)

257. 0.004 0.014 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
258. 0.010 0.010 ↑ 1.0 6 1

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

259. 1.865 25.284 ↑ 1.0 1,494 1

Hash (cost=661.51..661.51 rows=1,494 width=432) (actual time=25.284..25.284 rows=1,494 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 464kB
260. 1.864 23.419 ↑ 1.0 1,494 1

Hash Right Join (cost=600.76..661.51 rows=1,494 width=432) (actual time=19.215..23.419 rows=1,494 loops=1)

  • Hash Cond: (p_prin_p_int.processo_principal_id = proc_prin.id)
261. 2.076 9.842 ↑ 1.1 975 1

GroupAggregate (cost=316.97..354.95 rows=1,085 width=68) (actual time=7.484..9.842 rows=975 loops=1)

  • Group Key: p_prin_p_int.processo_principal_id, precatorios_7.id, p_prin.numero_processo
262. 1.289 7.766 ↑ 1.0 1,085 1

Sort (cost=316.97..319.68 rows=1,085 width=68) (actual time=7.456..7.766 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
263. 0.778 6.477 ↑ 1.0 1,085 1

Hash Join (cost=169.08..262.27 rows=1,085 width=68) (actual time=3.859..6.477 rows=1,085 loops=1)

  • Hash Cond: (p_prin_p_int.processo_interno_id = p_int.id)
264. 1.234 4.949 ↑ 1.0 1,085 1

Hash Join (cost=130.77..209.04 rows=1,085 width=49) (actual time=3.082..4.949 rows=1,085 loops=1)

  • Hash Cond: (precatorios_7.processo_principal_id = p_prin.id)
265. 0.662 0.662 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_7 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.007..0.662 rows=1,908 loops=1)

266. 0.445 3.053 ↑ 1.0 1,085 1

Hash (cost=117.21..117.21 rows=1,085 width=49) (actual time=3.053..3.053 rows=1,085 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 110kB
267. 0.837 2.608 ↑ 1.0 1,085 1

Hash Join (cost=78.44..117.21 rows=1,085 width=49) (actual time=1.521..2.608 rows=1,085 loops=1)

  • Hash Cond: (p_prin_p_int.processo_principal_id = p_prin.id)
268. 0.293 0.293 ↑ 1.0 1,085 1

Seq Scan on processo_principal_processo_internos p_prin_p_int (cost=0.00..23.85 rows=1,085 width=16) (actual time=0.015..0.293 rows=1,085 loops=1)

269. 0.767 1.478 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=1.478..1.478 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
270. 0.711 0.711 ↑ 1.0 2,064 1

Seq Scan on processo_principais p_prin (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.008..0.711 rows=2,064 loops=1)

271. 0.387 0.750 ↑ 1.0 1,125 1

Hash (cost=24.25..24.25 rows=1,125 width=27) (actual time=0.750..0.750 rows=1,125 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 81kB
272. 0.363 0.363 ↑ 1.0 1,125 1

Seq Scan on processo_internos p_int (cost=0.00..24.25 rows=1,125 width=27) (actual time=0.012..0.363 rows=1,125 loops=1)

273. 1.904 11.713 ↑ 1.0 1,494 1

Hash (cost=265.12..265.12 rows=1,494 width=368) (actual time=11.713..11.713 rows=1,494 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 439kB
274. 0.934 9.809 ↑ 1.0 1,494 1

Hash Left Join (cost=118.47..265.12 rows=1,494 width=368) (actual time=3.631..9.809 rows=1,494 loops=1)

  • Hash Cond: (precatorios.responsavel_acompanhamento = usuarios.id)
275. 0.963 8.848 ↑ 1.0 1,494 1

Hash Join (cost=117.13..254.08 rows=1,494 width=348) (actual time=3.583..8.848 rows=1,494 loops=1)

  • Hash Cond: (precatorios.natureza_precatorio_id = natureza_precatorios.id)
276. 0.980 7.872 ↑ 1.0 1,494 1

Hash Join (cost=116.04..232.44 rows=1,494 width=334) (actual time=3.559..7.872 rows=1,494 loops=1)

  • Hash Cond: (proc_prin.departamento_responsavel_id = depto.id)
277. 1.081 6.876 ↑ 1.0 1,494 1

Hash Join (cost=114.79..210.65 rows=1,494 width=287) (actual time=3.520..6.876 rows=1,494 loops=1)

  • Hash Cond: (proc_prin.vara_id = varas.id)
278. 1.759 5.723 ↑ 1.0 1,494 1

Hash Join (cost=111.87..187.19 rows=1,494 width=221) (actual time=3.436..5.723 rows=1,494 loops=1)

  • Hash Cond: (proc_prin.id = precatorios.processo_principal_id)
279. 0.562 0.562 ↑ 1.0 2,064 1

Seq Scan on processo_principais proc_prin (cost=0.00..52.64 rows=2,064 width=49) (actual time=0.008..0.562 rows=2,064 loops=1)

280. 0.983 3.402 ↑ 1.0 1,494 1

Hash (cost=93.19..93.19 rows=1,494 width=180) (actual time=3.402..3.402 rows=1,494 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 226kB
281. 1.667 2.419 ↑ 1.0 1,494 1

Hash Join (cost=10.02..93.19 rows=1,494 width=180) (actual time=0.242..2.419 rows=1,494 loops=1)

  • Hash Cond: (precatorios.assunto_precatorio_id = assunto_precatorios.id)
282. 0.538 0.538 ↑ 1.0 1,908 1

Seq Scan on precatorios (cost=0.00..61.08 rows=1,908 width=83) (actual time=0.009..0.538 rows=1,908 loops=1)

283. 0.118 0.214 ↑ 1.0 223 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 39kB
284. 0.096 0.096 ↑ 1.0 223 1

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

285. 0.021 0.072 ↑ 1.0 23 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
286. 0.030 0.051 ↑ 1.0 23 1

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

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

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

288. 0.005 0.009 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
289. 0.004 0.004 ↑ 1.0 4 1

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

290. 0.008 0.016 ↑ 1.0 11 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
291. 0.008 0.008 ↑ 1.0 11 1

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

292. 0.004 0.013 ↑ 1.0 4 1

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

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

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

294. 0.010 0.027 ↑ 1.0 15 1

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

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

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

296. 0.002 0.009 ↑ 1.0 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
297. 0.007 0.007 ↑ 1.0 3 1

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

298. 0.003 0.009 ↑ 1.0 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
299. 0.006 0.006 ↑ 1.0 3 1

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

300. 0.004 0.018 ↑ 1.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
301. 0.014 0.014 ↑ 1.0 2 1

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

302. 0.003 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: 9kB
303. 0.004 0.004 ↑ 1.0 2 1

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

304. 0.007 0.024 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
305. 0.017 0.017 ↑ 1.0 4 1

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

306. 0.324 8.945 ↑ 1.2 1,628 1

Hash (cost=612.85..612.85 rows=1,882 width=40) (actual time=8.945..8.945 rows=1,628 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 138kB
307. 0.172 8.621 ↑ 1.2 1,628 1

Subquery Scan on agregacao_numero_depre (cost=549.31..612.85 rows=1,882 width=40) (actual time=4.183..8.621 rows=1,628 loops=1)

308. 4.059 8.449 ↑ 1.2 1,628 1

GroupAggregate (cost=549.31..594.03 rows=1,882 width=34) (actual time=4.181..8.449 rows=1,628 loops=1)

  • Group Key: pp_1.precatorio_id
309. 0.960 4.390 ↑ 1.0 2,825 1

Sort (cost=549.31..556.38 rows=2,825 width=34) (actual time=4.167..4.390 rows=2,825 loops=1)

  • Sort Key: pp_1.precatorio_id
  • Sort Method: quicksort Memory: 317kB
310. 0.927 3.430 ↑ 1.0 2,825 1

Hash Join (cost=287.29..387.38 rows=2,825 width=34) (actual time=2.174..3.430 rows=2,825 loops=1)

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

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

312. 1.020 2.147 ↑ 1.0 7,524 1

Hash (cost=193.24..193.24 rows=7,524 width=16) (actual time=2.147..2.147 rows=7,524 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 417kB
313. 1.127 1.127 ↑ 1.0 7,524 1

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

314. 0.106 12.894 ↓ 2.7 915 1

Hash (cost=188.95..188.95 rows=344 width=16) (actual time=12.894..12.894 rows=915 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
315. 0.422 12.788 ↓ 2.7 915 1

Hash Join (cost=120.71..188.95 rows=344 width=16) (actual time=12.169..12.788 rows=915 loops=1)

  • Hash Cond: (precatorios_1.processo_principal_id = processo_principais.id)
316. 0.215 0.215 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_1 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.006..0.215 rows=1,908 loops=1)

317. 0.359 12.151 ↓ 1,007.0 1,007 1

Hash (cost=120.70..120.70 rows=1 width=24) (actual time=12.151..12.151 rows=1,007 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 64kB
318. 3.253 11.792 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.78..120.70 rows=1 width=24) (actual time=1.918..11.792 rows=1,007 loops=1)

  • Join Filter: (tipo_pendencias.telas_id = telas.id)
  • Rows Removed by Join Filter: 22154
319. 0.307 6.525 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.78..119.18 rows=1 width=32) (actual time=1.910..6.525 rows=1,007 loops=1)

320. 0.982 4.204 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.50..118.71 rows=1 width=24) (actual time=1.898..4.204 rows=1,007 loops=1)

  • Join Filter: (tipo_pendencias.gravidade_pendencia_id = gravidade_pendencias.id)
  • Rows Removed by Join Filter: 2014
321. 0.118 2.215 ↓ 1,007.0 1,007 1

Nested Loop (cost=109.50..117.65 rows=1 width=28) (actual time=1.888..2.215 rows=1,007 loops=1)

322. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on tipo_pendencias (cost=0.00..1.26 rows=1 width=20) (actual time=0.008..0.009 rows=1 loops=1)

  • Filter: (id = 18)
  • Rows Removed by Filter: 20
323. 0.492 2.088 ↓ 2.9 1,007 1

HashAggregate (cost=109.50..112.94 rows=344 width=8) (actual time=1.877..2.088 rows=1,007 loops=1)

  • Group Key: pp.id
324. 0.715 1.596 ↓ 2.9 1,007 1

Nested Loop (cost=26.56..108.64 rows=344 width=8) (actual time=0.381..1.596 rows=1,007 loops=1)

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

Seq Scan on parametros_negocios pn (cost=0.00..1.06 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=1)

  • Filter: ((nome)::text = 'num_dias_pendencia_processo_interno'::text)
  • Rows Removed by Filter: 4
326. 0.746 0.875 ↓ 1.1 1,089 1

Seq Scan on processo_principais pp (cost=26.56..84.36 rows=1,032 width=16) (actual time=0.358..0.875 rows=1,089 loops=1)

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

SubPlan (for Seq Scan)

328. 0.129 0.129 ↑ 1.0 1,085 1

Seq Scan on processo_principal_processo_internos pp_pi (cost=0.00..23.85 rows=1,085 width=8) (actual time=0.005..0.129 rows=1,085 loops=1)

329. 1.007 1.007 ↑ 1.0 3 1,007

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

330. 2.014 2.014 ↑ 1.0 1 1,007

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

  • Index Cond: (id = pp.id)
  • Heap Fetches: 1007
331. 2.014 2.014 ↑ 1.0 23 1,007

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

332. 0.282 2,897.811 ↑ 1.0 1,908 1

Hash (cost=1,572,066.18..1,572,066.18 rows=1,908 width=17) (actual time=2,897.811..2,897.811 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 121kB
333. 0.193 2,897.529 ↑ 1.0 1,908 1

Subquery Scan on percentual_cadastro_quitacao_precatorio (cost=1,571,942.16..1,572,066.18 rows=1,908 width=17) (actual time=2,893.840..2,897.529 rows=1,908 loops=1)

334. 3.001 2,897.336 ↑ 1.0 1,908 1

GroupAggregate (cost=1,571,942.16..1,572,047.10 rows=1,908 width=24) (actual time=2,893.839..2,897.336 rows=1,908 loops=1)

  • Group Key: prec_1.id, pp_2.precatorio_id
335. 3.261 2,894.335 ↓ 4.0 7,550 1

Sort (cost=1,571,942.16..1,571,946.93 rows=1,908 width=24) (actual time=2,893.817..2,894.335 rows=7,550 loops=1)

  • Sort Key: prec_1.id, pp_2.precatorio_id
  • Sort Method: quicksort Memory: 782kB
336. 1.815 2,891.074 ↓ 4.0 7,550 1

Hash Right Join (cost=1,570,895.11..1,571,838.20 rows=1,908 width=24) (actual time=2,878.450..2,891.074 rows=7,550 loops=1)

  • Hash Cond: (pp_2.precatorio_id = prec_1.id)
337. 4.937 2,888.820 ↓ 66.6 7,524 1

Nested Loop (cost=1,570,810.18..1,571,751.71 rows=113 width=16) (actual time=2,878.003..2,888.820 rows=7,524 loops=1)

  • Join Filter: ((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) = tp_sit.id)
  • Rows Removed by Join Filter: 15048
338. 5.169 2,883.883 ↑ 1.0 7,524 1

GroupAggregate (cost=1,570,810.18..1,571,336.86 rows=7,524 width=209) (actual time=2,877.986..2,883.883 rows=7,524 loops=1)

  • Group 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
339. 5.427 2,878.714 ↓ 1.0 7,583 1

Sort (cost=1,570,810.18..1,570,828.99 rows=7,524 width=209) (actual time=2,877.972..2,878.714 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: 2249kB
340. 3.143 2,873.287 ↓ 1.0 7,583 1

Hash Semi Join (cost=1,569,670.78..1,570,325.73 rows=7,524 width=209) (actual time=2,868.926..2,873.287 rows=7,583 loops=1)

  • Hash Cond: (tp_sit_pgto_quitado.id = (min(tipo_situacao_pagamentos_2.id)))
341. 5.208 2,870.135 ↓ 1.0 22,749 1

Nested Loop (cost=1,569,669.71..1,570,181.71 rows=22,572 width=209) (actual time=2,851.735..2,870.135 rows=22,749 loops=1)

342. 0.017 0.017 ↑ 1.0 3 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_quitado (cost=0.13..12.18 rows=3 width=8) (actual time=0.005..0.017 rows=3 loops=1)

  • Filter: ativo
343. 3.469 2,864.910 ↓ 1.0 7,583 3

Materialize (cost=1,569,669.58..1,569,906.20 rows=7,524 width=201) (actual time=950.576..954.970 rows=7,583 loops=3)

344. 1.395 2,861.441 ↓ 1.0 7,583 1

Hash Left Join (cost=1,569,669.58..1,569,868.58 rows=7,524 width=201) (actual time=2,851.724..2,861.441 rows=7,583 loops=1)

  • Hash Cond: (pp_2.id = pevr_pagamentos.precatorio_participantes_id)
345. 1.498 2,855.072 ↑ 1.0 7,524 1

Merge Left Join (cost=1,568,696.76..1,568,850.02 rows=7,524 width=201) (actual time=2,846.736..2,855.072 rows=7,524 loops=1)

  • Merge Cond: (pp_2.id = prim_ev.precatorio_participantes_id)
346. 2.798 1,494.729 ↑ 1.0 7,524 1

Nested Loop (cost=785,113.66..785,247.81 rows=7,524 width=193) (actual time=1,487.940..1,494.729 rows=7,524 loops=1)

347. 2.200 1,491.931 ↑ 1.0 7,524 1

Merge Left Join (cost=785,111.59..785,149.51 rows=7,524 width=177) (actual time=1,487.906..1,491.931 rows=7,524 loops=1)

  • Merge Cond: (pp_2.id = ult_ev_part.precatorio_participantes_id)
348. 5.144 19.987 ↑ 1.0 7,524 1

Sort (cost=1,498.86..1,517.67 rows=7,524 width=156) (actual time=18.242..19.987 rows=7,524 loops=1)

  • Sort Key: pp_2.id
  • Sort Method: quicksort Memory: 2068kB
349. 1.914 14.843 ↑ 1.0 7,524 1

Hash Left Join (cost=398.63..1,014.41 rows=7,524 width=156) (actual time=3.541..14.843 rows=7,524 loops=1)

  • Hash Cond: (pp_2.rpv_id = rpvs_2.id)
350. 1.440 12.158 ↑ 1.0 7,524 1

Hash Left Join (cost=321.48..883.27 rows=7,524 width=140) (actual time=2.755..12.158 rows=7,524 loops=1)

  • Hash Cond: (pp_2.categoria_precatorio_id = cat_prec.id)
351. 1.871 10.714 ↑ 1.0 7,524 1

Hash Left Join (cost=320.43..824.04 rows=7,524 width=118) (actual time=2.744..10.714 rows=7,524 loops=1)

  • Hash Cond: (pp_2.tipo_papel_id = tpapel.id)
352. 2.146 8.838 ↑ 1.0 7,524 1

Hash Join (cost=319.30..719.45 rows=7,524 width=110) (actual time=2.730..8.838 rows=7,524 loops=1)

  • Hash Cond: (pp_2.participante_id = part.id)
353. 3.000 5.693 ↑ 1.0 7,524 1

Hash Join (cost=189.60..486.30 rows=7,524 width=82) (actual time=1.712..5.693 rows=7,524 loops=1)

  • Hash Cond: (pp_2.precatorio_id = prec_2.id)
354. 0.995 0.995 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes pp_2 (cost=0.00..193.24 rows=7,524 width=49) (actual time=0.002..0.995 rows=7,524 loops=1)

355. 0.312 1.698 ↑ 1.0 1,908 1

Hash (cost=165.75..165.75 rows=1,908 width=41) (actual time=1.698..1.698 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 154kB
356. 0.598 1.386 ↑ 1.0 1,908 1

Hash Join (cost=78.44..165.75 rows=1,908 width=41) (actual time=0.616..1.386 rows=1,908 loops=1)

  • Hash Cond: (prec_2.processo_principal_id = pprin.id)
357. 0.193 0.193 ↑ 1.0 1,908 1

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

358. 0.304 0.595 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=0.595..0.595 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
359. 0.291 0.291 ↑ 1.0 2,064 1

Seq Scan on processo_principais pprin (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.003..0.291 rows=2,064 loops=1)

360. 0.495 0.999 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=0.999..0.999 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 252kB
361. 0.504 0.504 ↑ 1.0 3,142 1

Seq Scan on participantes part (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.006..0.504 rows=3,142 loops=1)

362. 0.002 0.005 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
363. 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.002..0.003 rows=6 loops=1)

364. 0.001 0.004 ↑ 1.0 2 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
365. 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)

366. 0.347 0.771 ↑ 1.0 2,140 1

Hash (cost=50.40..50.40 rows=2,140 width=24) (actual time=0.771..0.771 rows=2,140 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 151kB
367. 0.424 0.424 ↑ 1.0 2,140 1

Seq Scan on rpvs rpvs_2 (cost=0.00..50.40 rows=2,140 width=24) (actual time=0.005..0.424 rows=2,140 loops=1)

368. 0.237 1,469.744 ↓ 29.8 596 1

Sort (cost=783,612.73..783,612.78 rows=20 width=29) (actual time=1,469.656..1,469.744 rows=596 loops=1)

  • Sort Key: ult_ev_part.precatorio_participantes_id
  • Sort Method: quicksort Memory: 71kB
369. 0.132 1,469.507 ↓ 29.8 596 1

Subquery Scan on ult_ev_part (cost=783,612.05..783,612.30 rows=20 width=29) (actual time=1,469.324..1,469.507 rows=596 loops=1)

370. 1.438 1,469.375 ↓ 29.8 596 1

Sort (cost=783,612.05..783,612.10 rows=20 width=81) (actual time=1,469.321..1,469.375 rows=596 loops=1)

  • Sort Key: tab1_1.numero_processo_principal DESC, tab1_1.participantes_nome
  • Sort Method: quicksort Memory: 129kB
371. 3.124 1,467.937 ↓ 29.8 596 1

Subquery Scan on tab1_1 (cost=1,641.59..783,611.62 rows=20 width=81) (actual time=43.618..1,467.937 rows=596 loops=1)

  • Filter: (tab1_1.data_evento_id = (SubPlan 5))
  • Rows Removed by Filter: 638
372. 3.343 43.245 ↑ 3.2 1,234 1

GroupAggregate (cost=1,641.59..1,828.93 rows=3,944 width=151) (actual time=38.963..43.245 rows=1,234 loops=1)

  • Group 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
373. 5.718 39.902 ↑ 1.0 3,944 1

Sort (cost=1,641.59..1,651.45 rows=3,944 width=151) (actual time=38.952..39.902 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
374. 1.001 34.184 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_2 (cost=1,356.73..1,406.03 rows=3,944 width=151) (actual time=32.802..34.184 rows=3,944 loops=1)

375. 11.156 33.183 ↑ 1.0 3,944 1

Sort (cost=1,356.73..1,366.59 rows=3,944 width=141) (actual time=32.799..33.183 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: 1167kB
376. 7.536 22.027 ↑ 1.0 3,944 1

Hash Join (cost=963.72..1,121.16 rows=3,944 width=141) (actual time=12.720..22.027 rows=3,944 loops=1)

  • Hash Cond: (precatorios_8.processo_principal_id = processo_principais_5.id)
377. 1.657 13.726 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=124) (actual time=11.918..13.726 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))
378. 0.173 0.173 ↑ 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.005..0.173 rows=793 loops=1)

379. 1.686 11.896 ↑ 1.0 3,944 1

Hash (cost=826.12..826.12 rows=3,944 width=128) (actual time=11.896..11.896 rows=3,944 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 724kB
380. 1.349 10.210 ↑ 1.0 3,944 1

Hash Join (cost=619.22..826.12 rows=3,944 width=128) (actual time=6.686..10.210 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_2.tipo_rubrica_id = tipo_rubricas_2.id)
381. 1.623 8.824 ↑ 1.0 3,944 1

Hash Join (cost=617.44..770.11 rows=3,944 width=126) (actual time=6.643..8.824 rows=3,944 loops=1)

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

Seq Scan on rubrica_eventos rubrica_eventos_2 (cost=0.00..98.44 rows=3,944 width=24) (actual time=0.005..0.572 rows=3,944 loops=1)

383. 0.478 6.629 ↑ 1.0 1,234 1

Hash (cost=602.01..602.01 rows=1,234 width=110) (actual time=6.629..6.629 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
384. 0.447 6.151 ↑ 1.0 1,234 1

Hash Join (cost=262.73..602.01 rows=1,234 width=110) (actual time=2.697..6.151 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_7.tipo_papel_id = tipo_papeis_3.id)
385. 0.393 5.698 ↑ 1.0 1,234 1

Hash Join (cost=261.59..583.91 rows=1,234 width=110) (actual time=2.686..5.698 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_7.participante_id = participantes_6.id)
386. 0.395 4.028 ↑ 1.0 1,234 1

Hash Join (cost=131.90..437.25 rows=1,234 width=82) (actual time=1.400..4.028 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_7.precatorio_id = precatorios_8.id)
387. 0.358 2.915 ↑ 1.0 1,234 1

Hash Join (cost=46.97..335.35 rows=1,234 width=74) (actual time=0.671..2.915 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros_3.tipo_evento_financeiro_id = tipo_evento_financeiros_3.id)
388. 1.147 2.541 ↑ 1.0 1,234 1

Hash Join (cost=45.77..317.18 rows=1,234 width=60) (actual time=0.639..2.541 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_7.id = evento_financeiros_3.precatorio_participante_id)
389. 0.775 0.775 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_7 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.003..0.775 rows=7,524 loops=1)

390. 0.282 0.619 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=36) (actual time=0.619..0.619 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
391. 0.337 0.337 ↑ 1.0 1,234 1

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

392. 0.007 0.016 ↑ 1.0 9 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
393. 0.009 0.009 ↑ 1.0 9 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_3 (cost=0.00..1.09 rows=9 width=30) (actual time=0.008..0.009 rows=9 loops=1)

394. 0.303 0.718 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=0.718..0.718 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
395. 0.415 0.415 ↑ 1.0 1,908 1

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

396. 0.609 1.277 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=1.277..1.277 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 242kB
397. 0.668 0.668 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_6 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.005..0.668 rows=3,142 loops=1)

398. 0.004 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: 9kB
399. 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.001..0.002 rows=6 loops=1)

400. 0.009 0.037 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=10) (actual time=0.037..0.037 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
401. 0.028 0.028 ↑ 1.0 35 1

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

402. 0.374 0.765 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=0.765..0.765 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
403. 0.391 0.391 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_5 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.008..0.391 rows=2,064 loops=1)

404.          

SubPlan (for Subquery Scan)

405. 3.702 1,421.568 ↑ 1.0 1 1,234

Aggregate (cost=198.20..198.21 rows=1 width=32) (actual time=1.152..1.152 rows=1 loops=1,234)

406. 8.638 1,417.866 ↑ 1.5 2 1,234

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.146..1.149 rows=2 loops=1,234)

  • Group 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
407. 24.680 1,409.228 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.142..1.142 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
408. 2.468 1,384.548 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_9 (cost=197.96..198.00 rows=3 width=143) (actual time=1.120..1.122 rows=7 loops=1,234)

409. 28.382 1,382.080 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.119..1.120 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: 25kB
410. 32.080 1,353.698 ↓ 2.3 7 1,234

Nested Loop (cost=175.11..197.94 rows=3 width=131) (actual time=0.982..1.097 rows=7 loops=1,234)

411. 122.166 1,296.934 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.967..1.051 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))
412. 76.508 76.508 ↑ 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.003..0.062 rows=793 loops=1,234)

413. 6.170 1,098.260 ↓ 2.3 7 1,234

Hash (cost=174.79..174.79 rows=3 width=118) (actual time=0.890..0.890 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
414. 6.990 1,092.090 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..174.79 rows=3 width=118) (actual time=0.528..0.885 rows=7 loops=1,234)

415. 1.234 1,068.644 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..174.28 rows=3 width=118) (actual time=0.522..0.866 rows=7 loops=1,234)

416. 4.936 27.148 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_16.tipo_papel_id = tipo_papeis_12.id)
  • Rows Removed by Join Filter: 5
417. 1.234 19.744 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..24.91 rows=1 width=68) (actual time=0.014..0.016 rows=1 loops=1,234)

418. 3.702 14.808 ↑ 1.0 1 1,234

Nested Loop (cost=0.56..16.61 rows=1 width=40) (actual time=0.011..0.012 rows=1 loops=1,234)

419. 7.404 7.404 ↑ 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=32) (actual time=0.006..0.006 rows=1 loops=1,234)

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

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

  • Index Cond: (id = precatorio_participantes_16.precatorio_id)
421. 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.003..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_16.participante_id)
422. 2.468 2.468 ↑ 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.002 rows=6 loops=1,234)

423. 14.808 1,040.262 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.503..0.843 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
424. 461.516 1,025.454 ↓ 1.2 7 1,234

Hash Join (cost=33.45..146.74 rows=6 width=44) (actual time=0.499..0.831 rows=7 loops=1,234)

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

Seq Scan on rubrica_eventos rubrica_eventos_11 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.313 rows=3,944 loops=1,234)

426. 3.702 177.696 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
427. 173.994 173.994 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_12 (cost=0.00..33.42 rows=2 width=36) (actual time=0.072..0.141 rows=2 loops=1,234)

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

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

429. 0.006 0.006 ↑ 1.0 4 1

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

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

Index Only Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_11 (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_11.tipo_rubrica_id)
  • Heap Fetches: 8228
431. 24.684 24.684 ↑ 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.003 rows=1 loops=8,228)

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

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

433. 0.004 0.036 ↑ 1.0 1 1

Nested Loop (cost=2.06..4.25 rows=1 width=16) (actual time=0.030..0.036 rows=1 loops=1)

  • Join Filter: ((min(tipo_situacao_pagamentos_1.id)) = tp_sit_pgto_em_pgto.id)
  • Rows Removed by Join Filter: 2
434. 0.004 0.029 ↑ 1.0 1 1

Nested Loop (cost=2.06..3.18 rows=1 width=16) (actual time=0.026..0.029 rows=1 loops=1)

435. 0.008 0.022 ↑ 1.0 1 1

Nested Loop (cost=1.03..2.12 rows=1 width=8) (actual time=0.020..0.022 rows=1 loops=1)

  • Join Filter: (tp_sit_pgto_sem_lancamentos.id = (min(tipo_situacao_pagamentos.id)))
  • Rows Removed by Join Filter: 2
436. 0.004 0.012 ↑ 1.0 1 1

Aggregate (cost=1.03..1.04 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=1)

437. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on tipo_situacao_pagamentos (cost=0.00..1.03 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: (ativo AND indica_sem_lancamentos)
  • Rows Removed by Filter: 2
438. 0.002 0.002 ↑ 1.0 3 1

Seq Scan on tipo_situacao_pagamentos tp_sit_pgto_sem_lancamentos (cost=0.00..1.03 rows=3 width=8) (actual time=0.001..0.002 rows=3 loops=1)

  • Filter: ativo
439. 0.001 0.003 ↑ 1.0 1 1

Aggregate (cost=1.03..1.04 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

440. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on tipo_situacao_pagamentos tipo_situacao_pagamentos_1 (cost=0.00..1.03 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

  • Filter: (ativo AND indica_em_pagamento)
  • Rows Removed by Filter: 2
441. 0.003 0.003 ↑ 1.0 3 1

Seq Scan on tipo_situacao_pagamentos tp_sit_pgto_em_pgto (cost=0.00..1.03 rows=3 width=8) (actual time=0.001..0.003 rows=3 loops=1)

  • Filter: ativo
442. 0.178 1,358.845 ↓ 29.8 596 1

Sort (cost=783,583.10..783,583.15 rows=20 width=8) (actual time=1,358.788..1,358.845 rows=596 loops=1)

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

Subquery Scan on prim_ev (cost=783,582.42..783,582.67 rows=20 width=8) (actual time=1,358.538..1,358.667 rows=596 loops=1)

444. 1.399 1,358.581 ↓ 29.8 596 1

Sort (cost=783,582.42..783,582.47 rows=20 width=61) (actual time=1,358.537..1,358.581 rows=596 loops=1)

  • Sort Key: tab1_2.numero_processo_principal DESC, tab1_2.participantes_nome
  • Sort Method: quicksort Memory: 108kB
445. 2.282 1,357.182 ↓ 29.8 596 1

Subquery Scan on tab1_2 (cost=1,621.87..783,581.99 rows=20 width=61) (actual time=38.721..1,357.182 rows=596 loops=1)

  • Filter: (tab1_2.data_evento_id = (SubPlan 6))
  • Rows Removed by Filter: 638
446. 2.532 40.690 ↑ 3.2 1,234 1

GroupAggregate (cost=1,621.87..1,799.35 rows=3,944 width=143) (actual time=37.293..40.690 rows=1,234 loops=1)

  • Group 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
447. 5.858 38.158 ↑ 1.0 3,944 1

Sort (cost=1,621.87..1,631.73 rows=3,944 width=143) (actual time=37.282..38.158 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
448. 1.031 32.300 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_3 (cost=1,337.01..1,386.31 rows=3,944 width=143) (actual time=30.836..32.300 rows=3,944 loops=1)

449. 11.255 31.269 ↑ 1.0 3,944 1

Sort (cost=1,337.01..1,346.87 rows=3,944 width=131) (actual time=30.834..31.269 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: 1144kB
450. 6.910 20.014 ↑ 1.0 3,944 1

Hash Join (cost=963.72..1,101.44 rows=3,944 width=131) (actual time=11.437..20.014 rows=3,944 loops=1)

  • Hash Cond: (precatorios_9.processo_principal_id = processo_principais_6.id)
451. 1.599 12.332 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=114) (actual time=10.637..12.332 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))
452. 0.132 0.132 ↑ 1.0 793 1

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

453. 1.519 10.601 ↑ 1.0 3,944 1

Hash (cost=826.12..826.12 rows=3,944 width=118) (actual time=10.601..10.601 rows=3,944 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 663kB
454. 1.108 9.082 ↑ 1.0 3,944 1

Hash Join (cost=619.22..826.12 rows=3,944 width=118) (actual time=6.004..9.082 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_3.tipo_rubrica_id = tipo_rubricas_3.id)
455. 1.574 7.959 ↑ 1.0 3,944 1

Hash Join (cost=617.44..770.11 rows=3,944 width=118) (actual time=5.977..7.959 rows=3,944 loops=1)

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

Seq Scan on rubrica_eventos rubrica_eventos_3 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.424 rows=3,944 loops=1)

457. 0.472 5.961 ↑ 1.0 1,234 1

Hash (cost=602.01..602.01 rows=1,234 width=110) (actual time=5.961..5.961 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
458. 0.400 5.489 ↑ 1.0 1,234 1

Hash Join (cost=262.73..602.01 rows=1,234 width=110) (actual time=2.299..5.489 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.tipo_papel_id = tipo_papeis_4.id)
459. 0.342 5.084 ↑ 1.0 1,234 1

Hash Join (cost=261.59..583.91 rows=1,234 width=110) (actual time=2.285..5.084 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.participante_id = participantes_7.id)
460. 0.339 3.639 ↑ 1.0 1,234 1

Hash Join (cost=131.90..437.25 rows=1,234 width=82) (actual time=1.168..3.639 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.precatorio_id = precatorios_9.id)
461. 0.343 2.618 ↑ 1.0 1,234 1

Hash Join (cost=46.97..335.35 rows=1,234 width=74) (actual time=0.472..2.618 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros_4.tipo_evento_financeiro_id = tipo_evento_financeiros_4.id)
462. 0.999 2.265 ↑ 1.0 1,234 1

Hash Join (cost=45.77..317.18 rows=1,234 width=60) (actual time=0.453..2.265 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_8.id = evento_financeiros_4.precatorio_participante_id)
463. 0.831 0.831 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_8 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.004..0.831 rows=7,524 loops=1)

464. 0.207 0.435 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=36) (actual time=0.435..0.435 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
465. 0.228 0.228 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_4 (cost=0.00..30.34 rows=1,234 width=36) (actual time=0.003..0.228 rows=1,234 loops=1)

466. 0.003 0.010 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=30) (actual time=0.010..0.010 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
467. 0.007 0.007 ↑ 1.0 9 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_4 (cost=0.00..1.09 rows=9 width=30) (actual time=0.004..0.007 rows=9 loops=1)

468. 0.267 0.682 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=0.682..0.682 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
469. 0.415 0.415 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_9 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.004..0.415 rows=1,908 loops=1)

470. 0.532 1.103 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=1.103..1.103 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 242kB
471. 0.571 0.571 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_7 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.009..0.571 rows=3,142 loops=1)

472. 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: 9kB
473. 0.004 0.004 ↑ 1.0 6 1

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

474. 0.003 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
475. 0.012 0.012 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_3 (cost=0.00..1.35 rows=35 width=8) (actual time=0.006..0.012 rows=35 loops=1)

476. 0.354 0.772 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=0.772..0.772 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
477. 0.418 0.418 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_6 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.005..0.418 rows=2,064 loops=1)

478.          

SubPlan (for Subquery Scan)

479. 3.702 1,314.210 ↑ 1.0 1 1,234

Aggregate (cost=198.20..198.21 rows=1 width=32) (actual time=1.065..1.065 rows=1 loops=1,234)

480. 7.404 1,310.508 ↑ 1.5 2 1,234

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.060..1.062 rows=2 loops=1,234)

  • Group 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
481. 22.212 1,303.104 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.055..1.056 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
482. 3.702 1,280.892 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_10 (cost=197.96..198.00 rows=3 width=143) (actual time=1.036..1.038 rows=7 loops=1,234)

483. 24.680 1,277.190 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.035..1.035 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: 25kB
484. 34.138 1,252.510 ↓ 2.3 7 1,234

Nested Loop (cost=175.11..197.94 rows=3 width=131) (actual time=0.907..1.015 rows=7 loops=1,234)

485. 115.996 1,201.916 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.893..0.974 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))
486. 71.572 71.572 ↑ 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.003..0.058 rows=793 loops=1,234)

487. 6.170 1,014.348 ↓ 2.3 7 1,234

Hash (cost=174.79..174.79 rows=3 width=118) (actual time=0.822..0.822 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
488. 3.288 1,008.178 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..174.79 rows=3 width=118) (actual time=0.485..0.817 rows=7 loops=1,234)

489. 2.468 988.434 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..174.28 rows=3 width=118) (actual time=0.480..0.801 rows=7 loops=1,234)

490. 3.702 24.680 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..26.05 rows=1 width=68) (actual time=0.016..0.020 rows=1 loops=1,234)

  • Join Filter: (precatorio_participantes_17.tipo_papel_id = tipo_papeis_13.id)
  • Rows Removed by Join Filter: 5
491. 1.234 18.510 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..24.91 rows=1 width=68) (actual time=0.013..0.015 rows=1 loops=1,234)

492. 2.468 13.574 ↑ 1.0 1 1,234

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

493. 7.404 7.404 ↑ 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=32) (actual time=0.005..0.006 rows=1 loops=1,234)

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

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

  • Index Cond: (id = precatorio_participantes_17.precatorio_id)
495. 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.003..0.003 rows=1 loops=1,234)

  • Index Cond: (id = precatorio_participantes_17.participante_id)
496. 2.468 2.468 ↑ 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.002 rows=6 loops=1,234)

497. 12.340 961.286 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.463..0.779 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
498. 430.666 948.946 ↓ 1.2 7 1,234

Hash Join (cost=33.45..146.74 rows=6 width=44) (actual time=0.460..0.769 rows=7 loops=1,234)

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

Seq Scan on rubrica_eventos rubrica_eventos_12 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.286 rows=3,944 loops=1,234)

500. 3.702 165.356 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
501. 161.654 161.654 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_13 (cost=0.00..33.42 rows=2 width=36) (actual time=0.066..0.131 rows=2 loops=1,234)

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

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

503. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_13 (cost=0.00..1.09 rows=4 width=30) (actual time=0.006..0.007 rows=4 loops=1)

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

Index Only Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_12 (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_12.tipo_rubrica_id)
  • Heap Fetches: 8228
505. 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)
506. 0.012 4.974 ↑ 22.2 79 1

Hash (cost=950.94..950.94 rows=1,751 width=8) (actual time=4.974..4.974 rows=79 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 20kB
507. 0.014 4.962 ↑ 22.2 79 1

Subquery Scan on pevr_pagamentos (cost=929.05..950.94 rows=1,751 width=8) (actual time=4.944..4.962 rows=79 loops=1)

508. 0.162 4.948 ↑ 22.2 79 1

Sort (cost=929.05..933.43 rows=1,751 width=68) (actual time=4.943..4.948 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: 36kB
509. 0.250 4.786 ↑ 22.2 79 1

Hash Join (cost=756.84..834.73 rows=1,751 width=68) (actual time=4.351..4.786 rows=79 loops=1)

  • Hash Cond: (processo_principais_7.id = precatorios_10.processo_principal_id)
510. 0.206 0.206 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_7 (cost=0.00..52.64 rows=2,064 width=8) (actual time=0.007..0.206 rows=2,064 loops=1)

511. 0.020 4.330 ↑ 22.2 79 1

Hash (cost=734.95..734.95 rows=1,751 width=76) (actual time=4.330..4.330 rows=79 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 25kB
512. 0.109 4.310 ↑ 22.2 79 1

Hash Right Join (cost=712.86..734.95 rows=1,751 width=76) (actual time=4.151..4.310 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))
513. 0.063 0.063 ↑ 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.003..0.063 rows=793 loops=1)

514. 0.034 4.138 ↑ 22.2 79 1

Hash (cost=686.60..686.60 rows=1,751 width=80) (actual time=4.138..4.138 rows=79 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 25kB
515. 0.037 4.104 ↑ 22.2 79 1

Hash Join (cost=531.78..686.60 rows=1,751 width=80) (actual time=3.429..4.104 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_4.tipo_rubrica_id = tipo_rubricas_4.id)
516. 0.354 4.054 ↑ 22.2 79 1

Hash Join (cost=529.99..660.73 rows=1,751 width=80) (actual time=3.406..4.054 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_4.evento_financeiro_id = evento_financeiros_5.id)
517. 0.304 0.304 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_4 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.304 rows=3,944 loops=1)

518. 0.011 3.396 ↑ 27.4 20 1

Hash (cost=523.14..523.14 rows=548 width=72) (actual time=3.396..3.396 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
519. 0.021 3.385 ↑ 27.4 20 1

Hash Join (cost=264.20..523.14 rows=548 width=72) (actual time=2.000..3.385 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.tipo_papel_id = tipo_papeis_5.id)
520. 0.017 3.359 ↑ 27.4 20 1

Hash Join (cost=263.06..514.47 rows=548 width=72) (actual time=1.986..3.359 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.participante_id = participantes_8.id)
521. 0.019 2.290 ↑ 27.4 20 1

Hash Join (cost=133.37..377.24 rows=548 width=52) (actual time=0.922..2.290 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.precatorio_id = precatorios_10.id)
522. 0.642 1.613 ↑ 27.4 20 1

Hash Join (cost=48.44..284.78 rows=548 width=44) (actual time=0.253..1.613 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.id = evento_financeiros_5.precatorio_participante_id)
523. 0.737 0.737 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_9 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.004..0.737 rows=7,524 loops=1)

524. 0.004 0.234 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
525. 0.121 0.230 ↑ 27.4 20 1

Hash Join (cost=1.14..41.59 rows=548 width=20) (actual time=0.023..0.230 rows=20 loops=1)

  • Hash Cond: (evento_financeiros_5.tipo_evento_financeiro_id = tipo_evento_financeiros_5.id)
526. 0.097 0.097 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_5 (cost=0.00..30.34 rows=1,234 width=28) (actual time=0.002..0.097 rows=1,234 loops=1)

527. 0.006 0.012 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
528. 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=8) (actual time=0.004..0.006 rows=4 loops=1)

  • Filter: pagamento
  • Rows Removed by Filter: 5
529. 0.264 0.658 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=0.658..0.658 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
530. 0.394 0.394 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_10 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.004..0.394 rows=1,908 loops=1)

531. 0.509 1.052 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=1.052..1.052 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 252kB
532. 0.543 0.543 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_8 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.005..0.543 rows=3,142 loops=1)

533. 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: 9kB
534. 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)

535. 0.006 0.013 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
536. 0.007 0.007 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_4 (cost=0.00..1.35 rows=35 width=8) (actual time=0.003..0.007 rows=35 loops=1)

537. 0.002 0.009 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

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

Aggregate (cost=1.03..1.04 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

539. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on tipo_situacao_pagamentos tipo_situacao_pagamentos_2 (cost=0.00..1.03 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: (ativo AND indica_quitacao)
  • Rows Removed by Filter: 2
540. 0.000 0.000 ↑ 1.0 3 7,524

Materialize (cost=0.00..1.04 rows=3 width=16) (actual time=0.000..0.000 rows=3 loops=7,524)

541. 0.008 0.008 ↑ 1.0 3 1

Seq Scan on tipo_situacao_pagamentos tp_sit (cost=0.00..1.03 rows=3 width=16) (actual time=0.008..0.008 rows=3 loops=1)

542. 0.221 0.439 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=8) (actual time=0.439..0.439 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 91kB
543. 0.218 0.218 ↑ 1.0 1,908 1

Seq Scan on precatorios prec_1 (cost=0.00..61.08 rows=1,908 width=8) (actual time=0.003..0.218 rows=1,908 loops=1)

544. 0.191 2,775.767 ↑ 1.0 1,304 1

Hash (cost=1,570,857.67..1,570,857.67 rows=1,342 width=8) (actual time=2,775.767..2,775.767 rows=1,304 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 67kB
545. 0.142 2,775.576 ↑ 1.0 1,304 1

Subquery Scan on precatorios_atrasados_nao_quitados (cost=1,570,422.66..1,570,857.67 rows=1,342 width=8) (actual time=2,765.812..2,775.576 rows=1,304 loops=1)

546. 1.059 2,775.434 ↑ 1.0 1,304 1

GroupAggregate (cost=1,570,422.66..1,570,844.25 rows=1,342 width=8) (actual time=2,765.811..2,775.434 rows=1,304 loops=1)

  • Group Key: rpvs_3.precatorio_id
547. 2.426 2,774.375 ↓ 2.4 13,231 1

Merge Join (cost=1,570,422.66..1,570,816.86 rows=5,589 width=8) (actual time=2,765.800..2,774.375 rows=13,231 loops=1)

  • Merge Cond: (pp_3.precatorio_id = rpvs_3.precatorio_id)
548. 4.555 2,769.808 ↓ 1.9 7,304 1

GroupAggregate (cost=1,570,247.80..1,570,511.14 rows=3,762 width=209) (actual time=2,764.646..2,769.808 rows=7,304 loops=1)

  • Group 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
549. 4.873 2,765.253 ↓ 1.9 7,306 1

Sort (cost=1,570,247.80..1,570,257.20 rows=3,762 width=209) (actual time=2,764.638..2,765.253 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: 2226kB
550. 2.918 2,760.380 ↓ 2.0 7,506 1

Hash Semi Join (cost=1,569,670.78..1,570,024.39 rows=3,762 width=209) (actual time=2,756.232..2,760.380 rows=7,506 loops=1)

  • Hash Cond: (tp_sit_pgto_quitado_1.id = (min(tipo_situacao_pagamentos_5.id)))
551. 4.905 2,757.448 ↓ 2.0 22,518 1

Nested Loop (cost=1,569,669.71..1,569,951.84 rows=11,286 width=209) (actual time=2,739.969..2,757.448 rows=22,518 loops=1)

552. 0.016 0.016 ↑ 1.0 3 1

Index Scan using tipo_situacao_pagamentos_pkey on tipo_situacao_pagamentos tp_sit_pgto_quitado_1 (cost=0.13..12.18 rows=3 width=8) (actual time=0.005..0.016 rows=3 loops=1)

  • Filter: ativo
553. 3.276 2,752.527 ↓ 2.0 7,506 3

Materialize (cost=1,569,669.58..1,569,808.00 rows=3,762 width=201) (actual time=913.321..917.509 rows=7,506 loops=3)

554. 1.374 2,749.251 ↓ 2.0 7,506 1

Hash Left Join (cost=1,569,669.58..1,569,789.19 rows=3,762 width=201) (actual time=2,739.959..2,749.251 rows=7,506 loops=1)

  • Hash Cond: (pp_3.id = pevr_pagamentos_1.precatorio_participantes_id)
555. 1.436 2,743.079 ↓ 2.0 7,505 1

Merge Left Join (cost=1,568,696.76..1,568,793.49 rows=3,762 width=201) (actual time=2,735.149..2,743.079 rows=7,505 loops=1)

  • Merge Cond: (pp_3.id = prim_ev_1.precatorio_participantes_id)
556. 2.546 1,407.660 ↓ 2.0 7,505 1

Nested Loop (cost=785,113.66..785,200.79 rows=3,762 width=193) (actual time=1,401.208..1,407.660 rows=7,505 loops=1)

557. 2.439 1,405.114 ↓ 2.0 7,505 1

Merge Left Join (cost=785,111.59..785,149.51 rows=3,762 width=177) (actual time=1,401.175..1,405.114 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
558. 4.569 18.811 ↑ 1.0 7,524 1

Sort (cost=1,498.86..1,517.67 rows=7,524 width=156) (actual time=17.381..18.811 rows=7,524 loops=1)

  • Sort Key: pp_3.id
  • Sort Method: quicksort Memory: 2068kB
559. 1.753 14.242 ↑ 1.0 7,524 1

Hash Left Join (cost=398.63..1,014.41 rows=7,524 width=156) (actual time=3.614..14.242 rows=7,524 loops=1)

  • Hash Cond: (pp_3.rpv_id = rpvs_4.id)
560. 1.319 11.727 ↑ 1.0 7,524 1

Hash Left Join (cost=321.48..883.27 rows=7,524 width=140) (actual time=2.836..11.727 rows=7,524 loops=1)

  • Hash Cond: (pp_3.categoria_precatorio_id = cat_prec_1.id)
561. 1.778 10.402 ↑ 1.0 7,524 1

Hash Left Join (cost=320.43..824.04 rows=7,524 width=118) (actual time=2.820..10.402 rows=7,524 loops=1)

  • Hash Cond: (pp_3.tipo_papel_id = tpapel_1.id)
562. 2.038 8.618 ↑ 1.0 7,524 1

Hash Join (cost=319.30..719.45 rows=7,524 width=110) (actual time=2.805..8.618 rows=7,524 loops=1)

  • Hash Cond: (pp_3.participante_id = part_1.id)
563. 2.900 5.576 ↑ 1.0 7,524 1

Hash Join (cost=189.60..486.30 rows=7,524 width=82) (actual time=1.780..5.576 rows=7,524 loops=1)

  • Hash Cond: (pp_3.precatorio_id = prec_3.id)
564. 0.912 0.912 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes pp_3 (cost=0.00..193.24 rows=7,524 width=49) (actual time=0.005..0.912 rows=7,524 loops=1)

565. 0.324 1.764 ↑ 1.0 1,908 1

Hash (cost=165.75..165.75 rows=1,908 width=41) (actual time=1.764..1.764 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 154kB
566. 0.583 1.440 ↑ 1.0 1,908 1

Hash Join (cost=78.44..165.75 rows=1,908 width=41) (actual time=0.633..1.440 rows=1,908 loops=1)

  • Hash Cond: (prec_3.processo_principal_id = pprin_1.id)
567. 0.242 0.242 ↑ 1.0 1,908 1

Seq Scan on precatorios prec_3 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.004..0.242 rows=1,908 loops=1)

568. 0.306 0.615 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
569. 0.309 0.309 ↑ 1.0 2,064 1

Seq Scan on processo_principais pprin_1 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.005..0.309 rows=2,064 loops=1)

570. 0.499 1.004 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=1.004..1.004 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 252kB
571. 0.505 0.505 ↑ 1.0 3,142 1

Seq Scan on participantes part_1 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.006..0.505 rows=3,142 loops=1)

572. 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: 9kB
573. 0.003 0.003 ↑ 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.003 rows=6 loops=1)

574. 0.002 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: 9kB
575. 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.004..0.004 rows=2 loops=1)

576. 0.329 0.762 ↑ 1.0 2,140 1

Hash (cost=50.40..50.40 rows=2,140 width=24) (actual time=0.762..0.762 rows=2,140 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 151kB
577. 0.433 0.433 ↑ 1.0 2,140 1

Seq Scan on rpvs rpvs_4 (cost=0.00..50.40 rows=2,140 width=24) (actual time=0.006..0.433 rows=2,140 loops=1)

578. 0.247 1,383.864 ↓ 29.8 596 1

Sort (cost=783,612.73..783,612.78 rows=20 width=29) (actual time=1,383.782..1,383.864 rows=596 loops=1)

  • Sort Key: ult_ev_part_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 71kB
579. 0.110 1,383.617 ↓ 29.8 596 1

Subquery Scan on ult_ev_part_1 (cost=783,612.05..783,612.30 rows=20 width=29) (actual time=1,383.454..1,383.617 rows=596 loops=1)

580. 1.504 1,383.507 ↓ 29.8 596 1

Sort (cost=783,612.05..783,612.10 rows=20 width=81) (actual time=1,383.453..1,383.507 rows=596 loops=1)

  • Sort Key: tab1_3.numero_processo_principal DESC, tab1_3.participantes_nome
  • Sort Method: quicksort Memory: 129kB
581. 3.575 1,382.003 ↓ 29.8 596 1

Subquery Scan on tab1_3 (cost=1,641.59..783,611.62 rows=20 width=81) (actual time=41.572..1,382.003 rows=596 loops=1)

  • Filter: (tab1_3.data_evento_id = (SubPlan 7))
  • Rows Removed by Filter: 638
582. 3.150 40.772 ↑ 3.2 1,234 1

GroupAggregate (cost=1,641.59..1,828.93 rows=3,944 width=151) (actual time=36.716..40.772 rows=1,234 loops=1)

  • Group 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
583. 5.789 37.622 ↑ 1.0 3,944 1

Sort (cost=1,641.59..1,651.45 rows=3,944 width=151) (actual time=36.705..37.622 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
584. 1.026 31.833 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_4 (cost=1,356.73..1,406.03 rows=3,944 width=151) (actual time=30.402..31.833 rows=3,944 loops=1)

585. 11.074 30.807 ↑ 1.0 3,944 1

Sort (cost=1,356.73..1,366.59 rows=3,944 width=141) (actual time=30.400..30.807 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: 1167kB
586. 7.143 19.733 ↑ 1.0 3,944 1

Hash Join (cost=963.72..1,121.16 rows=3,944 width=141) (actual time=10.916..19.733 rows=3,944 loops=1)

  • Hash Cond: (precatorios_11.processo_principal_id = processo_principais_8.id)
587. 1.606 11.942 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=124) (actual time=10.232..11.942 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))
588. 0.126 0.126 ↑ 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.004..0.126 rows=793 loops=1)

589. 1.525 10.210 ↑ 1.0 3,944 1

Hash (cost=826.12..826.12 rows=3,944 width=128) (actual time=10.210..10.210 rows=3,944 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 724kB
590. 1.066 8.685 ↑ 1.0 3,944 1

Hash Join (cost=619.22..826.12 rows=3,944 width=128) (actual time=5.704..8.685 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_5.tipo_rubrica_id = tipo_rubricas_5.id)
591. 1.447 7.603 ↑ 1.0 3,944 1

Hash Join (cost=617.44..770.11 rows=3,944 width=126) (actual time=5.682..7.603 rows=3,944 loops=1)

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

Seq Scan on rubrica_eventos rubrica_eventos_5 (cost=0.00..98.44 rows=3,944 width=24) (actual time=0.005..0.489 rows=3,944 loops=1)

593. 0.435 5.667 ↑ 1.0 1,234 1

Hash (cost=602.01..602.01 rows=1,234 width=110) (actual time=5.667..5.667 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
594. 0.371 5.232 ↑ 1.0 1,234 1

Hash Join (cost=262.73..602.01 rows=1,234 width=110) (actual time=2.181..5.232 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_10.tipo_papel_id = tipo_papeis_6.id)
595. 0.317 4.855 ↑ 1.0 1,234 1

Hash Join (cost=261.59..583.91 rows=1,234 width=110) (actual time=2.165..4.855 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_10.participante_id = participantes_9.id)
596. 0.385 3.526 ↑ 1.0 1,234 1

Hash Join (cost=131.90..437.25 rows=1,234 width=82) (actual time=1.140..3.526 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_10.precatorio_id = precatorios_11.id)
597. 0.336 2.508 ↑ 1.0 1,234 1

Hash Join (cost=46.97..335.35 rows=1,234 width=74) (actual time=0.496..2.508 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros_6.tipo_evento_financeiro_id = tipo_evento_financeiros_6.id)
598. 0.973 2.162 ↑ 1.0 1,234 1

Hash Join (cost=45.77..317.18 rows=1,234 width=60) (actual time=0.470..2.162 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_10.id = evento_financeiros_6.precatorio_participante_id)
599. 0.739 0.739 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_10 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.004..0.739 rows=7,524 loops=1)

600. 0.202 0.450 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=36) (actual time=0.450..0.450 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
601. 0.248 0.248 ↑ 1.0 1,234 1

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

602. 0.004 0.010 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=30) (actual time=0.010..0.010 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
603. 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=30) (actual time=0.004..0.006 rows=9 loops=1)

604. 0.283 0.633 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=0.633..0.633 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
605. 0.350 0.350 ↑ 1.0 1,908 1

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

606. 0.484 1.012 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=1.012..1.012 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 242kB
607. 0.528 0.528 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_9 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.006..0.528 rows=3,142 loops=1)

608. 0.001 0.006 ↑ 1.0 6 1

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

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

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

610. 0.006 0.016 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
611. 0.010 0.010 ↑ 1.0 35 1

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

612. 0.312 0.648 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=0.648..0.648 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
613. 0.336 0.336 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_8 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.007..0.336 rows=2,064 loops=1)

614.          

SubPlan (for Subquery Scan)

615. 3.702 1,337.656 ↑ 1.0 1 1,234

Aggregate (cost=198.20..198.21 rows=1 width=32) (actual time=1.084..1.084 rows=1 loops=1,234)

616. 7.404 1,333.954 ↑ 1.5 2 1,234

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.079..1.081 rows=2 loops=1,234)

  • Group 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
617. 23.446 1,326.550 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.075..1.075 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
618. 2.468 1,303.104 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_11 (cost=197.96..198.00 rows=3 width=143) (actual time=1.054..1.056 rows=7 loops=1,234)

619. 25.914 1,300.636 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.053..1.054 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: 25kB
620. 36.606 1,274.722 ↓ 2.3 7 1,234

Nested Loop (cost=175.11..197.94 rows=3 width=131) (actual time=0.923..1.033 rows=7 loops=1,234)

621. 117.230 1,221.660 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.909..0.990 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))
622. 71.572 71.572 ↑ 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.003..0.058 rows=793 loops=1,234)

623. 6.170 1,032.858 ↓ 2.3 7 1,234

Hash (cost=174.79..174.79 rows=3 width=118) (actual time=0.837..0.837 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
624. 4.522 1,026.688 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..174.79 rows=3 width=118) (actual time=0.496..0.832 rows=7 loops=1,234)

625. 3.702 1,005.710 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..174.28 rows=3 width=118) (actual time=0.490..0.815 rows=7 loops=1,234)

626. 3.702 24.680 ↑ 1.0 1 1,234

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

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

Nested Loop (cost=0.84..24.91 rows=1 width=68) (actual time=0.014..0.015 rows=1 loops=1,234)

628. 2.468 13.574 ↑ 1.0 1 1,234

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

629. 7.404 7.404 ↑ 1.0 1 1,234

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

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

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

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

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

  • Index Cond: (id = precatorio_participantes_18.participante_id)
632. 2.468 2.468 ↑ 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.002 rows=6 loops=1,234)

633. 12.340 977.328 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.472..0.792 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
634. 431.900 964.988 ↓ 1.2 7 1,234

Hash Join (cost=33.45..146.74 rows=6 width=44) (actual time=0.469..0.782 rows=7 loops=1,234)

  • Hash Cond: (rubrica_eventos_13.evento_financeiro_id = evento_financeiros_14.id)
635. 362.796 362.796 ↑ 1.0 3,944 1,234

Seq Scan on rubrica_eventos rubrica_eventos_13 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.294 rows=3,944 loops=1,234)

636. 2.468 170.292 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
637. 167.824 167.824 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_14 (cost=0.00..33.42 rows=2 width=36) (actual time=0.068..0.136 rows=2 loops=1,234)

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

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

639. 0.007 0.007 ↑ 1.0 4 1

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

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

Index Only Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_13 (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_13.tipo_rubrica_id)
  • Heap Fetches: 8228
641. 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)
642. 0.000 0.000 ↑ 1.0 1 7,505

Materialize (cost=2.06..4.25 rows=1 width=16) (actual time=0.000..0.000 rows=1 loops=7,505)

643. 0.006 0.036 ↑ 1.0 1 1

Nested Loop (cost=2.06..4.25 rows=1 width=16) (actual time=0.029..0.036 rows=1 loops=1)

  • Join Filter: ((min(tipo_situacao_pagamentos_4.id)) = tp_sit_pgto_em_pgto_1.id)
  • Rows Removed by Join Filter: 2
644. 0.004 0.028 ↑ 1.0 1 1

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

645. 0.009 0.021 ↑ 1.0 1 1

Nested Loop (cost=1.03..2.12 rows=1 width=8) (actual time=0.018..0.021 rows=1 loops=1)

  • Join Filter: (tp_sit_pgto_sem_lancamentos_1.id = (min(tipo_situacao_pagamentos_3.id)))
  • Rows Removed by Join Filter: 2
646. 0.003 0.010 ↑ 1.0 1 1

Aggregate (cost=1.03..1.04 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=1)

647. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on tipo_situacao_pagamentos tipo_situacao_pagamentos_3 (cost=0.00..1.03 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: (ativo AND indica_sem_lancamentos)
  • Rows Removed by Filter: 2
648. 0.002 0.002 ↑ 1.0 3 1

Seq Scan on tipo_situacao_pagamentos tp_sit_pgto_sem_lancamentos_1 (cost=0.00..1.03 rows=3 width=8) (actual time=0.001..0.002 rows=3 loops=1)

  • Filter: ativo
649. 0.001 0.003 ↑ 1.0 1 1

Aggregate (cost=1.03..1.04 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

650. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on tipo_situacao_pagamentos tipo_situacao_pagamentos_4 (cost=0.00..1.03 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

  • Filter: (ativo AND indica_em_pagamento)
  • Rows Removed by Filter: 2
651. 0.002 0.002 ↑ 1.0 3 1

Seq Scan on tipo_situacao_pagamentos tp_sit_pgto_em_pgto_1 (cost=0.00..1.03 rows=3 width=8) (actual time=0.001..0.002 rows=3 loops=1)

  • Filter: ativo
652. 0.167 1,333.983 ↓ 29.8 596 1

Sort (cost=783,583.10..783,583.15 rows=20 width=8) (actual time=1,333.937..1,333.983 rows=596 loops=1)

  • Sort Key: prim_ev_1.precatorio_participantes_id
  • Sort Method: quicksort Memory: 52kB
653. 0.094 1,333.816 ↓ 29.8 596 1

Subquery Scan on prim_ev_1 (cost=783,582.42..783,582.67 rows=20 width=8) (actual time=1,333.683..1,333.816 rows=596 loops=1)

654. 1.208 1,333.722 ↓ 29.8 596 1

Sort (cost=783,582.42..783,582.47 rows=20 width=61) (actual time=1,333.682..1,333.722 rows=596 loops=1)

  • Sort Key: tab1_4.numero_processo_principal DESC, tab1_4.participantes_nome
  • Sort Method: quicksort Memory: 108kB
655. 2.510 1,332.514 ↓ 29.8 596 1

Subquery Scan on tab1_4 (cost=1,621.87..783,581.99 rows=20 width=61) (actual time=39.642..1,332.514 rows=596 loops=1)

  • Filter: (tab1_4.data_evento_id = (SubPlan 8))
  • Rows Removed by Filter: 638
656. 2.542 41.708 ↑ 3.2 1,234 1

GroupAggregate (cost=1,621.87..1,799.35 rows=3,944 width=143) (actual time=38.317..41.708 rows=1,234 loops=1)

  • Group 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
657. 5.465 39.166 ↑ 1.0 3,944 1

Sort (cost=1,621.87..1,631.73 rows=3,944 width=143) (actual time=38.308..39.166 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
658. 0.953 33.701 ↑ 1.0 3,944 1

Subquery Scan on precatorios_eventos_rubricas_5 (cost=1,337.01..1,386.31 rows=3,944 width=143) (actual time=32.318..33.701 rows=3,944 loops=1)

659. 11.508 32.748 ↑ 1.0 3,944 1

Sort (cost=1,337.01..1,346.87 rows=3,944 width=131) (actual time=32.316..32.748 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: 1144kB
660. 7.214 21.240 ↑ 1.0 3,944 1

Hash Join (cost=963.72..1,101.44 rows=3,944 width=131) (actual time=12.258..21.240 rows=3,944 loops=1)

  • Hash Cond: (precatorios_12.processo_principal_id = processo_principais_9.id)
661. 1.680 13.321 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=114) (actual time=11.518..13.321 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))
662. 0.147 0.147 ↑ 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.004..0.147 rows=793 loops=1)

663. 1.472 11.494 ↑ 1.0 3,944 1

Hash (cost=826.12..826.12 rows=3,944 width=118) (actual time=11.494..11.494 rows=3,944 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 663kB
664. 1.037 10.022 ↑ 1.0 3,944 1

Hash Join (cost=619.22..826.12 rows=3,944 width=118) (actual time=6.965..10.022 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_6.tipo_rubrica_id = tipo_rubricas_6.id)
665. 1.577 8.968 ↑ 1.0 3,944 1

Hash Join (cost=617.44..770.11 rows=3,944 width=118) (actual time=6.939..8.968 rows=3,944 loops=1)

  • Hash Cond: (rubrica_eventos_6.evento_financeiro_id = evento_financeiros_7.id)
666. 0.466 0.466 ↑ 1.0 3,944 1

Seq Scan on rubrica_eventos rubrica_eventos_6 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.466 rows=3,944 loops=1)

667. 0.576 6.925 ↑ 1.0 1,234 1

Hash (cost=602.01..602.01 rows=1,234 width=110) (actual time=6.925..6.925 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
668. 0.454 6.349 ↑ 1.0 1,234 1

Hash Join (cost=262.73..602.01 rows=1,234 width=110) (actual time=2.469..6.349 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_11.tipo_papel_id = tipo_papeis_7.id)
669. 0.447 5.891 ↑ 1.0 1,234 1

Hash Join (cost=261.59..583.91 rows=1,234 width=110) (actual time=2.456..5.891 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_11.participante_id = participantes_10.id)
670. 0.415 4.400 ↑ 1.0 1,234 1

Hash Join (cost=131.90..437.25 rows=1,234 width=82) (actual time=1.401..4.400 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_11.precatorio_id = precatorios_12.id)
671. 0.428 3.325 ↑ 1.0 1,234 1

Hash Join (cost=46.97..335.35 rows=1,234 width=74) (actual time=0.714..3.325 rows=1,234 loops=1)

  • Hash Cond: (evento_financeiros_7.tipo_evento_financeiro_id = tipo_evento_financeiros_7.id)
672. 1.211 2.888 ↑ 1.0 1,234 1

Hash Join (cost=45.77..317.18 rows=1,234 width=60) (actual time=0.688..2.888 rows=1,234 loops=1)

  • Hash Cond: (precatorio_participantes_11.id = evento_financeiros_7.precatorio_participante_id)
673. 1.011 1.011 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_11 (cost=0.00..193.24 rows=7,524 width=32) (actual time=0.004..1.011 rows=7,524 loops=1)

674. 0.363 0.666 ↑ 1.0 1,234 1

Hash (cost=30.34..30.34 rows=1,234 width=36) (actual time=0.666..0.666 rows=1,234 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
675. 0.303 0.303 ↑ 1.0 1,234 1

Seq Scan on evento_financeiros evento_financeiros_7 (cost=0.00..30.34 rows=1,234 width=36) (actual time=0.002..0.303 rows=1,234 loops=1)

676. 0.001 0.009 ↑ 1.0 9 1

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

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

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_7 (cost=0.00..1.09 rows=9 width=30) (actual time=0.004..0.008 rows=9 loops=1)

678. 0.274 0.660 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=16) (actual time=0.660..0.660 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
679. 0.386 0.386 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_12 (cost=0.00..61.08 rows=1,908 width=16) (actual time=0.010..0.386 rows=1,908 loops=1)

680. 0.510 1.044 ↑ 1.0 3,142 1

Hash (cost=90.42..90.42 rows=3,142 width=36) (actual time=1.044..1.044 rows=3,142 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 242kB
681. 0.534 0.534 ↑ 1.0 3,142 1

Seq Scan on participantes participantes_10 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.004..0.534 rows=3,142 loops=1)

682. 0.003 0.004 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
683. 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)

684. 0.010 0.017 ↑ 1.0 35 1

Hash (cost=1.35..1.35 rows=35 width=8) (actual time=0.017..0.017 rows=35 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
685. 0.007 0.007 ↑ 1.0 35 1

Seq Scan on tipo_rubricas tipo_rubricas_6 (cost=0.00..1.35 rows=35 width=8) (actual time=0.003..0.007 rows=35 loops=1)

686. 0.346 0.705 ↑ 1.0 2,064 1

Hash (cost=52.64..52.64 rows=2,064 width=33) (actual time=0.705..0.705 rows=2,064 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
687. 0.359 0.359 ↑ 1.0 2,064 1

Seq Scan on processo_principais processo_principais_9 (cost=0.00..52.64 rows=2,064 width=33) (actual time=0.007..0.359 rows=2,064 loops=1)

688.          

SubPlan (for Subquery Scan)

689. 3.702 1,288.296 ↑ 1.0 1 1,234

Aggregate (cost=198.20..198.21 rows=1 width=32) (actual time=1.044..1.044 rows=1 loops=1,234)

690. 7.404 1,284.594 ↑ 1.5 2 1,234

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.039..1.041 rows=2 loops=1,234)

  • Group 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
691. 22.212 1,277.190 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.035..1.035 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
692. 3.702 1,254.978 ↓ 2.3 7 1,234

Subquery Scan on precatorios_eventos_rubricas_12 (cost=197.96..198.00 rows=3 width=143) (actual time=1.015..1.017 rows=7 loops=1,234)

693. 24.680 1,251.276 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.014..1.014 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: 25kB
694. 32.904 1,226.596 ↓ 2.3 7 1,234

Nested Loop (cost=175.11..197.94 rows=3 width=131) (actual time=0.890..0.994 rows=7 loops=1,234)

695. 113.528 1,177.236 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.876..0.954 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))
696. 69.104 69.104 ↑ 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.002..0.056 rows=793 loops=1,234)

697. 4.936 994.604 ↓ 2.3 7 1,234

Hash (cost=174.79..174.79 rows=3 width=118) (actual time=0.806..0.806 rows=7 loops=1,234)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
698. 3.288 989.668 ↓ 2.3 7 1,234

Nested Loop (cost=34.43..174.79 rows=3 width=118) (actual time=0.479..0.802 rows=7 loops=1,234)

699. 2.468 969.924 ↓ 2.3 7 1,234

Nested Loop (cost=34.29..174.28 rows=3 width=118) (actual time=0.473..0.786 rows=7 loops=1,234)

700. 3.702 23.446 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_19.tipo_papel_id = tipo_papeis_15.id)
  • Rows Removed by Join Filter: 5
701. 1.234 17.276 ↑ 1.0 1 1,234

Nested Loop (cost=0.84..24.91 rows=1 width=68) (actual time=0.013..0.014 rows=1 loops=1,234)

702. 2.468 12.340 ↑ 1.0 1 1,234

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

703. 6.170 6.170 ↑ 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=32) (actual time=0.005..0.005 rows=1 loops=1,234)

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

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

  • Index Cond: (id = precatorio_participantes_19.precatorio_id)
705. 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)
706. 2.468 2.468 ↑ 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.002 rows=6 loops=1,234)

707. 12.340 944.010 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.456..0.765 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
708. 420.794 931.670 ↓ 1.2 7 1,234

Hash Join (cost=33.45..146.74 rows=6 width=44) (actual time=0.453..0.755 rows=7 loops=1,234)

  • Hash Cond: (rubrica_eventos_14.evento_financeiro_id = evento_financeiros_15.id)
709. 350.456 350.456 ↑ 1.0 3,944 1,234

Seq Scan on rubrica_eventos rubrica_eventos_14 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.284 rows=3,944 loops=1,234)

710. 2.468 160.420 ↑ 1.0 2 1,234

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
711. 157.952 157.952 ↑ 1.0 2 1,234

Seq Scan on evento_financeiros evento_financeiros_15 (cost=0.00..33.42 rows=2 width=36) (actual time=0.065..0.128 rows=2 loops=1,234)

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

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

713. 0.007 0.007 ↑ 1.0 4 1

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

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

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

  • Index Cond: (id = rubrica_eventos_14.tipo_rubrica_id)
  • Heap Fetches: 8228
715. 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)
716. 0.012 4.798 ↑ 22.2 79 1

Hash (cost=950.94..950.94 rows=1,751 width=8) (actual time=4.798..4.798 rows=79 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 20kB
717. 0.011 4.786 ↑ 22.2 79 1

Subquery Scan on pevr_pagamentos_1 (cost=929.05..950.94 rows=1,751 width=8) (actual time=4.769..4.786 rows=79 loops=1)

718. 0.160 4.775 ↑ 22.2 79 1

Sort (cost=929.05..933.43 rows=1,751 width=68) (actual time=4.767..4.775 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: 36kB