explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AYYpi

Settings
# exclusive inclusive rows x rows loops node
1. 1.772 5,381.365 ↑ 15.5 1,494 1

Hash Join (cost=2,371,129.64..3,241,811.56 rows=23,231 width=1,155) (actual time=4,611.923..5,381.365 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = percentual_cadastro_quitacao_precatorio.precatorio_id)
2. 0.622 2,410.385 ↑ 15.5 1,494 1

Hash Left Join (cost=799,111.16..1,663,723.98 rows=23,231 width=1,155) (actual time=1,642.686..2,410.385 rows=1,494 loops=1)

  • Hash Cond: (precatorios.id = precatorios_1.id)
3. 2.425 2,396.357 ↑ 15.5 1,494 1

Hash Right Join (cost=798,917.90..1,663,401.73 rows=23,231 width=1,147) (actual time=1,629.271..2,396.357 rows=1,494 loops=1)

  • Hash Cond: (quitacao_saldo_precatorio.precatorios_id = precatorios.id)
4. 0.120 2,265.044 ↑ 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,498.265..2,265.044 rows=360 loops=1)

5. 7.063 2,264.924 ↑ 3.0 360 1

GroupAggregate (cost=784,932.33..1,645,951.50 rows=1,063 width=65) (actual time=1,498.263..2,264.924 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))
6. 4.639 1,496.821 ↓ 4.8 5,052 1

Sort (cost=784,932.33..784,934.99 rows=1,063 width=65) (actual time=1,496.078..1,496.821 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
7. 0.779 1,492.182 ↓ 4.8 5,052 1

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

  • Hash Cond: (precatorio_participantes.orcamentario_id = orcamentarios.id)
8. 1.062 1,491.402 ↓ 4.8 5,052 1

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

  • Hash Cond: (precatorio_participantes.rpv_id = rpvs.id)
9. 0.955 1,489.594 ↓ 4.8 5,052 1

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

  • Hash Cond: (precatorios_2.id = precatorio_participantes.precatorio_id)
10. 0.334 1,486.395 ↓ 2.2 596 1

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

  • Hash Cond: (precatorios_2.id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
11. 0.731 10.528 ↑ 1.8 1,472 1

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

  • Group Key: processo_principais_1.numero_processo, precatorios_2.id
12. 4.292 9.797 ↑ 1.0 2,656 1

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

  • Sort Key: processo_principais_1.numero_processo, precatorios_2.id
  • Sort Method: quicksort Memory: 304kB
13. 0.765 5.505 ↑ 1.0 2,656 1

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

  • Hash Cond: (precatorio_participantes_1.participante_id = participantes_1.id)
14. 0.744 3.801 ↑ 1.0 2,656 1

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

  • Hash Cond: (precatorio_participantes_1.precatorio_id = precatorios_2.id)
15. 1.200 1.200 ↑ 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.007..1.200 rows=2,656 loops=1)

  • Filter: credor
  • Rows Removed by Filter: 4868
16. 0.355 1.857 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
17. 0.623 1.502 ↑ 1.0 1,908 1

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

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

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

19. 0.284 0.612 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
20. 0.328 0.328 ↑ 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.328 rows=2,064 loops=1)

21. 0.411 0.939 ↑ 1.0 3,142 1

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

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

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

23. 0.123 1,475.533 ↓ 29.8 596 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 57kB
24. 0.105 1,475.410 ↓ 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,475.258..1,475.410 rows=596 loops=1)

25. 1.572 1,475.305 ↓ 29.8 596 1

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

  • Sort Key: tab1.numero_processo_principal DESC, tab1.participantes_nome
  • Sort Method: quicksort Memory: 115kB
26. 3.069 1,473.733 ↓ 29.8 596 1

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

  • Filter: (tab1.data_evento_id = (SubPlan 4))
  • Rows Removed by Filter: 638
27. 3.186 41.692 ↑ 3.2 1,234 1

GroupAggregate (cost=1,641.59..1,828.93 rows=3,944 width=151) (actual time=37.553..41.692 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
28. 6.001 38.506 ↑ 1.0 3,944 1

Sort (cost=1,641.59..1,651.45 rows=3,944 width=151) (actual time=37.544..38.506 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
29. 1.281 32.505 ↑ 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=30.475..32.505 rows=3,944 loops=1)

30. 11.676 31.224 ↑ 1.0 3,944 1

Sort (cost=1,356.73..1,366.59 rows=3,944 width=141) (actual time=30.472..31.224 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
31. 7.207 19.548 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_3.processo_principal_id = processo_principais_2.id)
32. 1.678 11.681 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=124) (actual time=9.887..11.681 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))
33. 0.135 0.135 ↑ 1.0 793 1

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

34. 1.412 9.868 ↑ 1.0 3,944 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 724kB
35. 1.071 8.456 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos.tipo_rubrica_id = tipo_rubricas.id)
36. 1.431 7.370 ↑ 1.0 3,944 1

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

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

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

38. 0.403 5.585 ↑ 1.0 1,234 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
39. 0.349 5.182 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.tipo_papel_id = tipo_papeis_1.id)
40. 0.358 4.828 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.participante_id = participantes_2.id)
41. 0.335 3.446 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.precatorio_id = precatorios_3.id)
42. 0.328 2.533 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros.tipo_evento_financeiro_id = tipo_evento_financeiros.id)
43. 0.983 2.196 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.id = evento_financeiros.precatorio_participante_id)
44. 0.798 0.798 ↑ 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.003..0.798 rows=7,524 loops=1)

45. 0.198 0.415 ↑ 1.0 1,234 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
46. 0.217 0.217 ↑ 1.0 1,234 1

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

47. 0.004 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
48. 0.005 0.005 ↑ 1.0 9 1

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

49. 0.241 0.578 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
50. 0.337 0.337 ↑ 1.0 1,908 1

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

51. 0.510 1.024 ↑ 1.0 3,142 1

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

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

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

53. 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
54. 0.004 0.004 ↑ 1.0 6 1

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

55. 0.006 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
56. 0.009 0.009 ↑ 1.0 35 1

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

57. 0.310 0.660 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
58. 0.350 0.350 ↑ 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.010..0.350 rows=2,064 loops=1)

59.          

SubPlan (for Subquery Scan)

60. 3.702 1,428.972 ↑ 1.0 1 1,234

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

61. 7.404 1,425.270 ↑ 1.5 2 1,234

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

  • 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
62. 23.446 1,417.866 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.148..1.149 rows=7 loops=1,234)

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

Subquery Scan on precatorios_eventos_rubricas_6 (cost=197.96..198.00 rows=3 width=143) (actual time=1.128..1.130 rows=7 loops=1,234)

64. 25.914 1,390.718 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.127..1.127 rows=7 loops=1,234)

  • 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: 25kB
65. 34.138 1,364.804 ↓ 2.3 7 1,234

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

66. 118.464 1,314.210 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.982..1.065 rows=7 loops=1,234)

  • Hash Cond: ((configuracao_rubrica_precatorios_7.precatorio_id = precatorios_13.id) AND (configuracao_rubrica_precatorios_7.tipo_rubrica_id = tipo_rubricas_7.id))
67. 86.380 86.380 ↑ 1.0 793 1,234

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_7 (cost=0.00..15.93 rows=793 width=12) (actual time=0.002..0.070 rows=793 loops=1,234)

68. 6.170 1,109.366 ↓ 2.3 7 1,234

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

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

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

70. 3.702 1,083.452 ↓ 2.3 7 1,234

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

71. 2.468 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_12.tipo_papel_id = tipo_papeis_8.id)
  • Rows Removed by Join Filter: 5
72. 2.468 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)

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

74. 6.170 6.170 ↑ 1.0 1 1,234

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

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

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

Index Scan using participantes_pkey on participantes participantes_11 (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_12.participante_id)
77. 2.468 2.468 ↑ 1.0 6 1,234

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

78. 12.340 1,056.304 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.494..0.856 rows=7 loops=1,234)

  • Join Filter: (evento_financeiros_8.tipo_evento_financeiro_id = tipo_evento_financeiros_8.id)
  • Rows Removed by Join Filter: 21
79. 482.494 1,043.964 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_7.evento_financeiro_id = evento_financeiros_8.id)
80. 383.774 383.774 ↑ 1.0 3,944 1,234

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

81. 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
82. 173.994 173.994 ↑ 1.0 2 1,234

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

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

84. 0.005 0.005 ↑ 1.0 4 1

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

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

Index Only Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_7 (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_7.tipo_rubrica_id)
  • Heap Fetches: 8228
86. 16.456 16.456 ↑ 1.0 1 8,228

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

  • Index Cond: (id = precatorios_13.processo_principal_id)
87. 1.013 2.244 ↑ 1.0 7,524 1

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

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

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

89. 0.275 0.746 ↑ 1.0 2,140 1

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

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

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

91. 0.001 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
92. 0.000 0.000 ↓ 0.0 0 1

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

93.          

SubPlan (for GroupAggregate)

94. 0.360 761.040 ↑ 1.0 1 360

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

95. 1.800 760.680 ↓ 0.0 0 360

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

  • Sort Key: tab1_3.numero_processo_principal DESC, tab1_3.participantes_nome
  • Sort Method: quicksort Memory: 25kB
96. 0.420 758.880 ↓ 0.0 0 360

Subquery Scan on tab1_3 (cost=413.31..809.86 rows=1 width=61) (actual time=2.074..2.108 rows=0 loops=360)

  • Filter: (tab1_3.data_evento_id = (SubPlan 2))
  • Rows Removed by Filter: 0
97. 2.880 734.040 ↓ 0.0 0 360

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

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

Sort (cost=413.31..413.31 rows=2 width=151) (actual time=2.030..2.031 rows=11 loops=360)

  • 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: 56kB
99. 1.440 723.240 ↓ 5.5 11 360

Subquery Scan on precatorios_eventos_rubricas_5 (cost=413.27..413.30 rows=2 width=151) (actual time=2.005..2.009 rows=11 loops=360)

100. 12.240 721.800 ↓ 5.5 11 360

Sort (cost=413.27..413.28 rows=2 width=141) (actual time=2.004..2.005 rows=11 loops=360)

  • Sort Key: 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: 56kB
101. 16.688 709.560 ↓ 5.5 11 360

Nested Loop Left Join (cost=257.40..413.26 rows=2 width=141) (actual time=1.541..1.971 rows=11 loops=360)

  • Join Filter: ((precatorios_12.id = configuracao_rubrica_precatorios_6.precatorio_id) AND (tipo_rubricas_6.id = configuracao_rubrica_precatorios_6.tipo_rubrica_id))
  • Rows Removed by Join Filter: 39
102. 1.472 661.320 ↓ 5.5 11 360

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

103. 1.440 651.960 ↓ 5.5 11 360

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

104. 2.160 2.160 ↑ 1.0 1 360

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

  • Index Cond: (id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
105. 3.272 648.360 ↓ 5.5 11 360

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

106. 129.960 637.200 ↓ 5.5 11 360

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

  • Hash Cond: (rubrica_eventos_6.evento_financeiro_id = evento_financeiros_7.id)
107. 105.480 105.480 ↑ 1.0 3,944 360

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

108. 1.080 401.760 ↓ 3.0 3 360

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

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

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

  • Join Filter: (precatorio_participantes_11.tipo_papel_id = tipo_papeis_7.id)
  • Rows Removed by Join Filter: 17
110. 0.772 396.360 ↓ 3.0 3 360

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

111. 1.852 393.120 ↓ 3.0 3 360

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

112. 39.960 388.800 ↓ 3.0 3 360

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

  • Hash Cond: (evento_financeiros_7.precatorio_participante_id = precatorio_participantes_11.id)
113. 32.040 32.040 ↑ 1.0 1,234 360

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

114. 1.080 316.800 ↑ 1.0 4 360

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
115. 315.720 315.720 ↑ 1.0 4 360

Seq Scan on precatorio_participantes precatorio_participantes_11 (cost=0.00..212.05 rows=4 width=32) (actual time=0.166..0.877 rows=4 loops=360)

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

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

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

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

119. 7.888 7.888 ↑ 1.0 1 3,944

Index Scan using tipo_rubricas_pkey on tipo_rubricas tipo_rubricas_6 (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_6.tipo_rubrica_id)
120. 7.888 7.888 ↑ 1.0 1 3,944

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

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

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

122. 29.520 29.520 ↑ 1.0 2 360

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

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

SubPlan (for Subquery Scan)

124. 0.100 24.420 ↑ 1.0 1 20

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

125. 0.180 24.320 ↑ 1.0 3 20

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

  • 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
126. 0.580 24.140 ↓ 4.0 12 20

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.206..1.207 rows=12 loops=20)

  • 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: 32kB
127. 0.100 23.560 ↓ 4.0 12 20

Subquery Scan on precatorios_eventos_rubricas_4 (cost=197.96..198.00 rows=3 width=143) (actual time=1.174..1.178 rows=12 loops=20)

128. 0.780 23.460 ↓ 4.0 12 20

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.172..1.173 rows=12 loops=20)

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

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

130. 1.880 21.400 ↓ 4.0 12 20

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.942..1.070 rows=12 loops=20)

  • Hash Cond: ((configuracao_rubrica_precatorios_5.precatorio_id = precatorios_11.id) AND (configuracao_rubrica_precatorios_5.tipo_rubrica_id = tipo_rubricas_5.id))
131. 1.100 1.100 ↑ 1.0 793 20

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_5 (cost=0.00..15.93 rows=793 width=12) (actual time=0.003..0.055 rows=793 loops=20)

132. 0.160 18.420 ↓ 4.0 12 20

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
133. 0.000 18.260 ↓ 4.0 12 20

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

134. 0.060 17.780 ↓ 4.0 12 20

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

135. 0.080 1.420 ↑ 1.0 1 20

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

  • Join Filter: (precatorio_participantes_10.tipo_papel_id = tipo_papeis_6.id)
  • Rows Removed by Join Filter: 5
136. 0.040 0.340 ↑ 1.0 1 20

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

137. 0.060 0.240 ↑ 1.0 1 20

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

138. 0.120 0.120 ↑ 1.0 1 20

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

  • Index Cond: (id = tab1_3.precatorio_participantes_id)
139. 0.060 0.060 ↑ 1.0 1 20

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

  • Index Cond: (id = precatorio_participantes_10.precatorio_id)
140. 0.060 0.060 ↑ 1.0 1 20

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

  • Index Cond: (id = precatorio_participantes_10.participante_id)
141. 1.000 1.000 ↑ 1.0 6 20

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

142. 0.380 16.300 ↓ 4.0 12 20

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

  • Join Filter: (evento_financeiros_6.tipo_evento_financeiro_id = tipo_evento_financeiros_6.id)
  • Rows Removed by Join Filter: 52
143. 7.720 15.920 ↓ 2.7 16 20

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

  • Hash Cond: (rubrica_eventos_5.evento_financeiro_id = evento_financeiros_6.id)
144. 5.620 5.620 ↑ 1.0 3,944 20

Seq Scan on rubrica_eventos rubrica_eventos_5 (cost=0.00..98.44 rows=3,944 width=16) (actual time=0.002..0.281 rows=3,944 loops=20)

145. 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
146. 2.520 2.520 ↓ 2.0 4 20

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

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

148. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_6 (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
149. 0.482 0.482 ↑ 1.0 1 241

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

  • Index Cond: (id = rubrica_eventos_5.tipo_rubrica_id)
  • Heap Fetches: 241
150. 0.482 0.482 ↑ 1.0 1 241

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

  • Index Cond: (id = precatorios_11.processo_principal_id)
151. 2.735 128.888 ↑ 15.5 1,494 1

Hash (cost=10,405.18..10,405.18 rows=23,231 width=1,130) (actual time=128.888..128.888 rows=1,494 loops=1)

  • Buckets: 16384 Batches: 2 Memory Usage: 582kB
152. 0.987 126.153 ↑ 15.5 1,494 1

Merge Left Join (cost=8,594.15..10,405.18 rows=23,231 width=1,130) (actual time=91.151..126.153 rows=1,494 loops=1)

  • Merge Cond: (precatorios.id = pp_1.precatorio_id)
153. 1.067 113.629 ↑ 15.5 1,494 1

Merge Left Join (cost=8,044.83..9,390.55 rows=23,231 width=1,098) (actual time=86.555..113.629 rows=1,494 loops=1)

  • Merge Cond: (precatorios.id = agregacao_participantes_precatorio.precatorios_id)
154. 1.396 85.322 ↑ 3.9 1,494 1

Merge Left Join (cost=5,905.06..6,887.58 rows=5,891 width=970) (actual time=59.858..85.322 rows=1,494 loops=1)

  • Merge Cond: (precatorios.id = precatorios_6.id)
155. 0.796 46.373 ↑ 3.9 1,494 1

Merge Left Join (cost=4,642.22..4,683.12 rows=5,891 width=586) (actual time=45.029..46.373 rows=1,494 loops=1)

  • Merge Cond: (precatorios.id = precatorios_com_sequestro.precatorio_id)
156. 1.821 45.302 ↑ 3.9 1,494 1

Sort (cost=4,399.33..4,414.06 rows=5,891 width=578) (actual time=44.750..45.302 rows=1,494 loops=1)

  • Sort Key: precatorios.id
  • Sort Method: quicksort Memory: 866kB
157. 0.534 43.481 ↑ 3.9 1,494 1

Hash Join (cost=3,775.88..4,030.43 rows=5,891 width=578) (actual time=41.481..43.481 rows=1,494 loops=1)

  • Hash Cond: (precatorios.tipo_origem_informacao_id = tipo_origem_informacoes.id)
158. 0.327 42.938 ↑ 3.9 1,494 1

Hash Left Join (cost=3,774.79..3,948.34 rows=5,891 width=561) (actual time=41.465..42.938 rows=1,494 loops=1)

  • Hash Cond: (precatorios.modo_lancamento_valor_id = modo_lancamento_valores.id)
159. 0.456 42.607 ↑ 3.9 1,494 1

Hash Left Join (cost=3,773.75..3,913.96 rows=5,891 width=553) (actual time=41.455..42.607 rows=1,494 loops=1)

  • Hash Cond: ((max(prec_part_1.categoria_precatorio_id)) = categoria_precatorios.id)
160. 0.706 42.145 ↑ 3.9 1,494 1

Hash Right Join (cost=3,772.70..3,890.24 rows=5,891 width=539) (actual time=41.440..42.145 rows=1,494 loops=1)

  • Hash Cond: (precatorios_eventos_rubricas_1.precatorios_id = precatorios.id)
161. 0.020 4.926 ↑ 175.1 10 1

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

  • Group Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
162. 0.041 4.906 ↑ 22.2 79 1

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

  • Sort Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
  • Sort Method: quicksort Memory: 31kB
163. 0.013 4.865 ↑ 22.2 79 1

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

164. 0.156 4.852 ↑ 22.2 79 1

Sort (cost=937.81..942.18 rows=1,751 width=95) (actual time=4.846..4.852 rows=79 loops=1)

  • Sort Key: precatorios_4.id, participantes_3.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
165. 0.225 4.696 ↑ 22.2 79 1

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

  • Hash Cond: (processo_principais_3.id = precatorios_4.processo_principal_id)
166. 0.229 0.229 ↑ 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.007..0.229 rows=2,064 loops=1)

167. 0.019 4.242 ↑ 22.2 79 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 26kB
168. 0.128 4.223 ↑ 22.2 79 1

Hash Right Join (cost=712.86..734.95 rows=1,751 width=78) (actual time=4.028..4.223 rows=79 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios_1.precatorio_id = precatorios_4.id) AND (configuracao_rubrica_precatorios_1.tipo_rubrica_id = tipo_rubricas_1.id))
169. 0.082 0.082 ↑ 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.004..0.082 rows=793 loops=1)

170. 0.020 4.013 ↑ 22.2 79 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 26kB
171. 0.026 3.993 ↑ 22.2 79 1

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

  • Hash Cond: (rubrica_eventos_1.tipo_rubrica_id = tipo_rubricas_1.id)
172. 0.372 3.952 ↑ 22.2 79 1

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

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

174. 0.008 3.269 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
175. 0.013 3.261 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.tipo_papel_id = tipo_papeis_2.id)
176. 0.021 3.244 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.participante_id = participantes_3.id)
177. 0.010 2.203 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.precatorio_id = precatorios_4.id)
178. 0.697 1.582 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.id = evento_financeiros_1.precatorio_participante_id)
179. 0.652 0.652 ↑ 1.0 7,524 1

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

180. 0.007 0.233 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
181. 0.119 0.226 ↑ 27.4 20 1

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

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

183. 0.001 0.007 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
184. 0.006 0.006 ↑ 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.004..0.006 rows=4 loops=1)

  • Filter: pagamento
  • Rows Removed by Filter: 5
185. 0.233 0.611 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
186. 0.378 0.378 ↑ 1.0 1,908 1

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

187. 0.530 1.020 ↑ 1.0 3,142 1

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

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

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

189. 0.002 0.004 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
190. 0.002 0.002 ↑ 1.0 6 1

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

191. 0.005 0.015 ↑ 1.0 35 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
192. 0.010 0.010 ↑ 1.0 35 1

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

193. 0.951 36.513 ↑ 3.9 1,494 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 559kB
194. 1.195 35.562 ↑ 3.9 1,494 1

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

  • Hash Cond: (prec_part_1.precatorio_id = precatorios.id)
195. 4.286 17.129 ↑ 4.0 1,882 1

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

  • Group Key: prec_part_1.precatorio_id, proc.numero_processo
196. 3.249 12.843 ↑ 1.0 7,524 1

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

  • Sort Key: prec_part_1.precatorio_id, proc.numero_processo
  • Sort Method: quicksort Memory: 968kB
197. 1.941 9.594 ↑ 1.0 7,524 1

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

  • Hash Cond: (prec_part_1.participante_id = participantes_4.id)
198. 1.214 6.859 ↑ 1.0 7,524 1

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

  • Hash Cond: (prec_part_1.categoria_precatorio_id = cat.id)
199. 2.995 5.640 ↑ 1.0 7,524 1

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

  • Hash Cond: (prec_part_1.precatorio_id = prec.id)
200. 0.869 0.869 ↑ 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.002..0.869 rows=7,524 loops=1)

201. 0.300 1.776 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
202. 0.600 1.476 ↑ 1.0 1,908 1

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

  • Hash Cond: (prec.processo_principal_id = proc.id)
203. 0.241 0.241 ↑ 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.241 rows=1,908 loops=1)

204. 0.297 0.635 ↑ 1.0 2,064 1

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

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

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

206. 0.002 0.005 ↑ 1.0 2 1

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

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

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

208. 0.371 0.794 ↑ 1.0 3,142 1

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

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

Seq Scan on participantes participantes_4 (cost=0.00..90.42 rows=3,142 width=8) (actual time=0.006..0.423 rows=3,142 loops=1)

210. 0.845 17.238 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 485kB
211. 0.454 16.393 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.fase_id = fases.id)
212. 0.263 15.933 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.detalhe_natureza_precatorio_id = detalhe_natureza_precatorios.id)
213. 0.591 15.661 ↑ 1.0 1,494 1

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

  • Hash Cond: (prec_part.precatorio_id = precatorios.id)
214. 0.060 3.410 ↑ 1.0 160 1

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

  • Hash Cond: (prec_part.tipo_papel_id = tipo_papeis.id)
215. 0.081 3.341 ↑ 1.0 160 1

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

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

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

  • Filter: (encabecante IS TRUE)
  • Rows Removed by Filter: 7364
217. 1.079 1.959 ↑ 1.0 3,142 1

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

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

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

219. 0.005 0.009 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
220. 0.004 0.004 ↑ 1.0 6 1

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

221. 0.801 11.660 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 464kB
222. 0.739 10.859 ↑ 1.0 1,494 1

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

  • Hash Cond: (p_prin_p_int.processo_principal_id = proc_prin.id)
223. 0.859 4.397 ↑ 1.1 975 1

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

  • Group Key: p_prin_p_int.processo_principal_id, precatorios_5.id, p_prin.numero_processo
224. 0.604 3.538 ↑ 1.0 1,085 1

Sort (cost=316.97..319.68 rows=1,085 width=68) (actual time=3.408..3.538 rows=1,085 loops=1)

  • Sort Key: p_prin_p_int.processo_principal_id, precatorios_5.id, p_prin.numero_processo
  • Sort Method: quicksort Memory: 201kB
225. 0.368 2.934 ↑ 1.0 1,085 1

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

  • Hash Cond: (p_prin_p_int.processo_interno_id = p_int.id)
226. 0.543 2.049 ↑ 1.0 1,085 1

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

  • Hash Cond: (precatorios_5.processo_principal_id = p_prin.id)
227. 0.261 0.261 ↑ 1.0 1,908 1

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

228. 0.210 1.245 ↑ 1.0 1,085 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 110kB
229. 0.311 1.035 ↑ 1.0 1,085 1

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

  • Hash Cond: (p_prin_p_int.processo_principal_id = p_prin.id)
230. 0.113 0.113 ↑ 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.007..0.113 rows=1,085 loops=1)

231. 0.310 0.611 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
232. 0.301 0.301 ↑ 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.006..0.301 rows=2,064 loops=1)

233. 0.289 0.517 ↑ 1.0 1,125 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 81kB
234. 0.228 0.228 ↑ 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.006..0.228 rows=1,125 loops=1)

235. 0.963 5.723 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 439kB
236. 0.408 4.760 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.responsavel_acompanhamento = usuarios.id)
237. 0.477 4.343 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.natureza_precatorio_id = natureza_precatorios.id)
238. 0.421 3.861 ↑ 1.0 1,494 1

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

  • Hash Cond: (proc_prin.departamento_responsavel_id = depto.id)
239. 0.516 3.432 ↑ 1.0 1,494 1

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

  • Hash Cond: (proc_prin.vara_id = varas.id)
240. 0.814 2.887 ↑ 1.0 1,494 1

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

  • Hash Cond: (proc_prin.id = precatorios.processo_principal_id)
241. 0.291 0.291 ↑ 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.004..0.291 rows=2,064 loops=1)

242. 0.500 1.782 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 226kB
243. 0.838 1.282 ↑ 1.0 1,494 1

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

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

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

245. 0.090 0.142 ↑ 1.0 223 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 39kB
246. 0.052 0.052 ↑ 1.0 223 1

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

247. 0.005 0.029 ↑ 1.0 23 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
248. 0.016 0.024 ↑ 1.0 23 1

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

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

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

250. 0.002 0.005 ↑ 1.0 4 1

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

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

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

252. 0.004 0.008 ↑ 1.0 11 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
253. 0.004 0.004 ↑ 1.0 11 1

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

254. 0.000 0.005 ↑ 1.0 4 1

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

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

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

256. 0.002 0.009 ↑ 1.0 15 1

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

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

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

258. 0.004 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
259. 0.005 0.005 ↑ 1.0 3 1

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

260. 0.003 0.006 ↑ 1.0 3 1

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

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

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

262. 0.004 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
263. 0.002 0.002 ↑ 1.0 2 1

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

264. 0.001 0.004 ↑ 1.0 2 1

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

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

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

266. 0.003 0.009 ↑ 1.0 4 1

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

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

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

268. 0.008 0.275 ↓ 0.0 0 1

Sort (cost=242.88..243.50 rows=247 width=8) (actual time=0.275..0.275 rows=0 loops=1)

  • Sort Key: precatorios_com_sequestro.precatorio_id
  • Sort Method: quicksort Memory: 25kB
269. 0.000 0.267 ↓ 0.0 0 1

Subquery Scan on precatorios_com_sequestro (cost=228.13..233.07 rows=247 width=8) (actual time=0.267..0.267 rows=0 loops=1)

270. 0.002 0.267 ↓ 0.0 0 1

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

  • Group Key: precatorio_participantes_4.precatorio_id, true
271. 0.001 0.265 ↓ 0.0 0 1

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

272. 0.138 0.264 ↓ 0.0 0 1

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

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

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

274. 0.002 0.008 ↑ 1.0 1 1

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

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

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

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

  • Index Cond: (id = evento_financeiros_2.precatorio_participante_id)
277. 0.642 37.553 ↑ 1.0 1,882 1

Materialize (cost=1,262.84..2,106.14 rows=1,908 width=392) (actual time=14.825..37.553 rows=1,882 loops=1)

278. 20.698 36.911 ↑ 1.0 1,882 1

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

  • Group Key: precatorios_6.id
279. 3.570 16.213 ↓ 1.0 7,787 1

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

  • Sort Key: precatorios_6.id
  • Sort Method: quicksort Memory: 680kB
280. 1.970 12.643 ↓ 1.0 7,787 1

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

  • Hash Cond: (precatorio_participantes_5.rpv_id = rpvs_1.id)
281. 2.142 9.600 ↓ 1.0 7,787 1

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

  • Hash Cond: (precatorio_participantes_5.precatorio_id = precatorios_6.id)
282. 1.483 6.942 ↓ 1.0 7,787 1

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

  • Hash Cond: (oficio_orcamentarios_normais.precatorio_participante_id = precatorio_participantes_5.id)
283. 0.247 0.247 ↑ 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.007..0.247 rows=1,043 loops=1)

  • Filter: (NOT preferencial)
  • Rows Removed by Filter: 306
284. 1.256 5.212 ↑ 1.0 7,524 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 441kB
285. 1.273 3.956 ↑ 1.0 7,524 1

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

  • Hash Cond: (oficio_orcamentarios_preferenciais.precatorio_participante_id = precatorio_participantes_5.id)
286. 0.174 0.174 ↑ 1.0 306 1

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

  • Filter: preferencial
  • Rows Removed by Filter: 1043
287. 1.128 2.509 ↑ 1.0 7,524 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 437kB
288. 1.381 1.381 ↑ 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.005..1.381 rows=7,524 loops=1)

289. 0.242 0.516 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 91kB
290. 0.274 0.274 ↑ 1.0 1,908 1

Seq Scan on precatorios precatorios_6 (cost=0.00..61.08 rows=1,908 width=8) (actual time=0.004..0.274 rows=1,908 loops=1)

291. 0.521 1.073 ↑ 1.0 2,140 1

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

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

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

293. 1.286 27.240 ↑ 4.0 1,882 1

Sort (cost=2,139.78..2,158.59 rows=7,524 width=136) (actual time=26.693..27.240 rows=1,882 loops=1)

  • Sort Key: agregacao_participantes_precatorio.precatorios_id
  • Sort Method: quicksort Memory: 621kB
294. 0.261 25.954 ↑ 4.0 1,882 1

Subquery Scan on agregacao_participantes_precatorio (cost=1,203.89..1,655.33 rows=7,524 width=136) (actual time=20.998..25.954 rows=1,882 loops=1)

295. 4.017 25.693 ↑ 4.0 1,882 1

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

  • Group Key: processo_principais_4.numero_processo, precatorios_7.id
296. 13.374 21.676 ↑ 1.0 7,524 1

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

  • Sort Key: processo_principais_4.numero_processo, precatorios_7.id
  • Sort Method: quicksort Memory: 1271kB
297. 2.141 8.302 ↑ 1.0 7,524 1

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

  • Hash Cond: (precatorio_participantes_6.participante_id = participantes_5.id)
298. 2.219 4.989 ↑ 1.0 7,524 1

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

  • Hash Cond: (precatorio_participantes_6.precatorio_id = precatorios_7.id)
299. 0.897 0.897 ↑ 1.0 7,524 1

Seq Scan on precatorio_participantes precatorio_participantes_6 (cost=0.00..193.24 rows=7,524 width=16) (actual time=0.007..0.897 rows=7,524 loops=1)

300. 0.281 1.873 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
301. 0.660 1.592 ↑ 1.0 1,908 1

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

  • Hash Cond: (precatorios_7.processo_principal_id = processo_principais_4.id)
302. 0.276 0.276 ↑ 1.0 1,908 1

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

303. 0.325 0.656 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
304. 0.331 0.331 ↑ 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.007..0.331 rows=2,064 loops=1)

305. 0.569 1.172 ↑ 1.0 3,142 1

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

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

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

307. 0.341 11.537 ↑ 1.2 1,628 1

Materialize (cost=549.31..617.55 rows=1,882 width=40) (actual time=4.593..11.537 rows=1,628 loops=1)

308. 6.236 11.196 ↑ 1.2 1,628 1

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

  • Group Key: pp_1.precatorio_id
309. 1.065 4.960 ↑ 1.0 2,825 1

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

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

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

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

312. 1.169 2.559 ↑ 1.0 7,524 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 417kB
313. 1.390 1.390 ↑ 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.005..1.390 rows=7,524 loops=1)

314. 0.125 13.406 ↓ 2.7 915 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
315. 0.436 13.281 ↓ 2.7 915 1

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

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

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

317. 0.338 12.606 ↓ 1,007.0 1,007 1

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

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

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

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

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

320. 1.037 4.430 ↓ 1,007.0 1,007 1

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

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

Nested Loop (cost=109.50..117.65 rows=1 width=28) (actual time=2.011..2.386 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.006..0.009 rows=1 loops=1)

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

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

  • Group Key: pp.id
324. 0.784 1.788 ↓ 2.9 1,007 1

Nested Loop (cost=26.56..108.64 rows=344 width=8) (actual time=0.431..1.788 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.005 0.005 ↑ 1.0 1 1

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

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

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

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

SubPlan (for Seq Scan)

328. 0.164 0.164 ↑ 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.006..0.164 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.259 2,969.208 ↑ 1.0 1,908 1

Hash (cost=1,571,994.63..1,571,994.63 rows=1,908 width=8) (actual time=2,969.208..2,969.208 rows=1,908 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 91kB
333. 0.198 2,968.949 ↑ 1.0 1,908 1

Subquery Scan on percentual_cadastro_quitacao_precatorio (cost=1,571,942.16..1,571,994.63 rows=1,908 width=8) (actual time=2,967.284..2,968.949 rows=1,908 loops=1)

334. 1.026 2,968.751 ↑ 1.0 1,908 1

GroupAggregate (cost=1,571,942.16..1,571,975.55 rows=1,908 width=16) (actual time=2,967.284..2,968.751 rows=1,908 loops=1)

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

Sort (cost=1,571,942.16..1,571,946.93 rows=1,908 width=16) (actual time=2,967.279..2,967.725 rows=7,550 loops=1)

  • Sort Key: prec_1.id, pp_2.precatorio_id
  • Sort Method: quicksort Memory: 546kB
336. 1.757 2,964.873 ↓ 4.0 7,550 1

Hash Right Join (cost=1,570,895.11..1,571,838.20 rows=1,908 width=16) (actual time=2,952.657..2,964.873 rows=7,550 loops=1)

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

Nested Loop (cost=1,570,810.18..1,571,751.71 rows=113 width=8) (actual time=2,952.193..2,962.659 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.088 2,958.071 ↑ 1.0 7,524 1

GroupAggregate (cost=1,570,810.18..1,571,336.86 rows=7,524 width=209) (actual time=2,952.178..2,958.071 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.109 2,952.983 ↓ 1.0 7,583 1

Sort (cost=1,570,810.18..1,570,828.99 rows=7,524 width=209) (actual time=2,952.167..2,952.983 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. 2.866 2,947.874 ↓ 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,943.767..2,947.874 rows=7,583 loops=1)

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

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

342. 0.015 0.015 ↑ 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.015 rows=3 loops=1)

  • Filter: ativo
343. 3.175 2,940.078 ↓ 1.0 7,583 3

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

344. 1.333 2,936.903 ↓ 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,927.365..2,936.903 rows=7,583 loops=1)

  • Hash Cond: (pp_2.id = pevr_pagamentos.precatorio_participantes_id)
345. 1.400 2,930.734 ↑ 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,922.516..2,930.734 rows=7,524 loops=1)

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

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

347. 3.086 1,540.948 ↑ 1.0 7,524 1

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (pp_2.precatorio_id = prec_2.id)
354. 0.964 0.964 ↑ 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.005..0.964 rows=7,524 loops=1)

355. 0.319 1.674 ↑ 1.0 1,908 1

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

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

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

  • Hash Cond: (prec_2.processo_principal_id = pprin.id)
357. 0.190 0.190 ↑ 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.190 rows=1,908 loops=1)

358. 0.267 0.594 ↑ 1.0 2,064 1

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

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

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

360. 0.509 1.007 ↑ 1.0 3,142 1

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

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

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

362. 0.005 0.009 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
363. 0.004 0.004 ↑ 1.0 6 1

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

364. 0.003 0.007 ↑ 1.0 2 1

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

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

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

366. 0.305 0.729 ↑ 1.0 2,140 1

Hash (cost=50.40..50.40 rows=2,140 width=24) (actual time=0.729..0.729 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.007..0.424 rows=2,140 loops=1)

368. 0.216 1,519.494 ↓ 29.8 596 1

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

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

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

370. 1.330 1,519.175 ↓ 29.8 596 1

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

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

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

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

GroupAggregate (cost=1,641.59..1,828.93 rows=3,944 width=151) (actual time=46.571..50.572 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. 13.777 47.511 ↑ 1.0 3,944 1

Sort (cost=1,641.59..1,651.45 rows=3,944 width=151) (actual time=46.558..47.511 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.022 33.734 ↑ 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.246..33.734 rows=3,944 loops=1)

375. 11.406 32.712 ↑ 1.0 3,944 1

Sort (cost=1,356.73..1,366.59 rows=3,944 width=141) (actual time=32.244..32.712 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.965 21.306 ↑ 1.0 3,944 1

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

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

Hash Right Join (cost=885.28..909.61 rows=3,944 width=124) (actual time=10.521..12.645 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.153 0.153 ↑ 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.153 rows=793 loops=1)

379. 1.478 10.497 ↑ 1.0 3,944 1

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

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

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

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

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

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

383. 0.429 5.671 ↑ 1.0 1,234 1

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_7.id = evento_financeiros_3.precatorio_participante_id)
389. 0.790 0.790 ↑ 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.004..0.790 rows=7,524 loops=1)

390. 0.197 0.448 ↑ 1.0 1,234 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
391. 0.251 0.251 ↑ 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.006..0.251 rows=1,234 loops=1)

392. 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
393. 0.007 0.007 ↑ 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.004..0.007 rows=9 loops=1)

394. 0.231 0.582 ↑ 1.0 1,908 1

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

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

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

396. 0.490 0.987 ↑ 1.0 3,142 1

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

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

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

398. 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
399. 0.003 0.003 ↑ 1.0 6 1

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

400. 0.007 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
401. 0.009 0.009 ↑ 1.0 35 1

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

402. 0.346 0.696 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
403. 0.350 0.350 ↑ 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.007..0.350 rows=2,064 loops=1)

404.          

SubPlan (for Subquery Scan)

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

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

406. 7.404 1,461.056 ↑ 1.5 2 1,234

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

  • 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
407. 23.446 1,453.652 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.177..1.178 rows=7 loops=1,234)

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

Subquery Scan on precatorios_eventos_rubricas_7 (cost=197.96..198.00 rows=3 width=143) (actual time=1.157..1.159 rows=7 loops=1,234)

409. 27.148 1,426.504 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.156..1.156 rows=7 loops=1,234)

  • 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: 25kB
410. 35.372 1,399.356 ↓ 2.3 7 1,234

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

411. 138.208 1,347.528 ↓ 2.3 7 1,234

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=1.010..1.092 rows=7 loops=1,234)

  • Hash Cond: ((configuracao_rubrica_precatorios_8.precatorio_id = precatorios_14.id) AND (configuracao_rubrica_precatorios_8.tipo_rubrica_id = tipo_rubricas_8.id))
412. 72.806 72.806 ↑ 1.0 793 1,234

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_8 (cost=0.00..15.93 rows=793 width=12) (actual time=0.002..0.059 rows=793 loops=1,234)

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

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

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

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

415. 2.468 1,098.260 ↓ 2.3 7 1,234

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

416. 2.468 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_13.tipo_papel_id = tipo_papeis_9.id)
  • Rows Removed by Join Filter: 5
417. 2.468 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)

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

419. 6.170 6.170 ↑ 1.0 1 1,234

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_13 (cost=0.28..8.30 rows=1 width=32) (actual time=0.005..0.005 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_14 (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_13.precatorio_id)
421. 3.702 3.702 ↑ 1.0 1 1,234

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

  • Index Cond: (id = precatorio_participantes_13.participante_id)
422. 2.468 2.468 ↑ 1.0 6 1,234

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

423. 12.340 1,072.346 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.535..0.869 rows=7 loops=1,234)

  • Join Filter: (evento_financeiros_9.tipo_evento_financeiro_id = tipo_evento_financeiros_9.id)
  • Rows Removed by Join Filter: 21
424. 467.686 1,060.006 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_8.evento_financeiro_id = evento_financeiros_9.id)
425. 387.476 387.476 ↑ 1.0 3,944 1,234

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

426. 2.468 204.844 ↑ 1.0 2 1,234

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

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

Seq Scan on evento_financeiros evento_financeiros_9 (cost=0.00..33.42 rows=2 width=36) (actual time=0.097..0.164 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.007 0.007 ↑ 1.0 4 1

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

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

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.003..0.003 rows=1 loops=8,228)

  • Index Cond: (id = rubrica_eventos_8.tipo_rubrica_id)
  • Heap Fetches: 8228
431. 16.456 16.456 ↑ 1.0 1 8,228

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

  • Index Cond: (id = precatorios_14.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.005 0.033 ↑ 1.0 1 1

Nested Loop (cost=2.06..4.25 rows=1 width=16) (actual time=0.026..0.033 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.003 0.025 ↑ 1.0 1 1

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

435. 0.009 0.019 ↑ 1.0 1 1

Nested Loop (cost=1.03..2.12 rows=1 width=8) (actual time=0.016..0.019 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.003 0.008 ↑ 1.0 1 1

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

437. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on tipo_situacao_pagamentos (cost=0.00..1.03 rows=1 width=8) (actual time=0.004..0.005 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.001..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.191 1,385.774 ↓ 29.8 596 1

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

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

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

444. 1.479 1,385.508 ↓ 29.8 596 1

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

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

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

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

GroupAggregate (cost=1,621.87..1,799.35 rows=3,944 width=143) (actual time=35.260..38.700 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.309 36.094 ↑ 1.0 3,944 1

Sort (cost=1,621.87..1,631.73 rows=3,944 width=143) (actual time=35.252..36.094 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. 0.941 30.785 ↑ 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=29.353..30.785 rows=3,944 loops=1)

449. 10.859 29.844 ↑ 1.0 3,944 1

Sort (cost=1,337.01..1,346.87 rows=3,944 width=131) (actual time=29.350..29.844 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. 7.078 18.985 ↑ 1.0 3,944 1

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

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

Hash Right Join (cost=885.28..909.61 rows=3,944 width=114) (actual time=9.554..11.310 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.106 0.106 ↑ 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.004..0.106 rows=793 loops=1)

453. 1.182 9.535 ↑ 1.0 3,944 1

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

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

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

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

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

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

457. 0.351 5.352 ↑ 1.0 1,234 1

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

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

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

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

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

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

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

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

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

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

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

  • Hash Cond: (precatorio_participantes_8.id = evento_financeiros_4.precatorio_participante_id)
463. 0.755 0.755 ↑ 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.003..0.755 rows=7,524 loops=1)

464. 0.187 0.384 ↑ 1.0 1,234 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
465. 0.197 0.197 ↑ 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.197 rows=1,234 loops=1)

466. 0.002 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
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.003..0.007 rows=9 loops=1)

468. 0.245 0.599 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
469. 0.354 0.354 ↑ 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.354 rows=1,908 loops=1)

470. 0.462 0.940 ↑ 1.0 3,142 1

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

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

Seq Scan on participantes participantes_7 (cost=0.00..90.42 rows=3,142 width=36) (actual time=0.004..0.478 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.006 0.012 ↑ 1.0 35 1

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

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

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

476. 0.278 0.597 ↑ 1.0 2,064 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 178kB
477. 0.319 0.319 ↑ 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.004..0.319 rows=2,064 loops=1)

478.          

SubPlan (for Subquery Scan)

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

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

480. 6.170 1,338.890 ↑ 1.5 2 1,234

GroupAggregate (cost=198.03..198.16 rows=3 width=143) (actual time=1.083..1.085 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
481. 23.446 1,332.720 ↓ 2.3 7 1,234

Sort (cost=198.03..198.03 rows=3 width=143) (actual time=1.079..1.080 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
482. 2.468 1,309.274 ↓ 2.3 7 1,234

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

483. 25.914 1,306.806 ↓ 2.3 7 1,234

Sort (cost=197.96..197.97 rows=3 width=131) (actual time=1.058..1.059 rows=7 loops=1,234)

  • Sort Key: precatorios_15.id, 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: 25kB
484. 34.138 1,280.892 ↓ 2.3 7 1,234

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

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

Hash Right Join (cost=174.83..196.72 rows=3 width=114) (actual time=0.916..0.997 rows=7 loops=1,234)

  • Hash Cond: ((configuracao_rubrica_precatorios_9.precatorio_id = precatorios_15.id) AND (configuracao_rubrica_precatorios_9.tipo_rubrica_id = tipo_rubricas_9.id))
486. 71.572 71.572 ↑ 1.0 793 1,234

Seq Scan on configuracao_rubrica_precatorios configuracao_rubrica_precatorios_9 (cost=0.00..15.93 rows=793 width=12) (actual time=0.002..0.058 rows=793 loops=1,234)

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

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

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

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

489. 2.468 1,018.050 ↓ 2.3 7 1,234

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

490. 2.468 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_14.tipo_papel_id = tipo_papeis_10.id)
  • Rows Removed by Join Filter: 5
491. 1.234 20.978 ↑ 1.0 1 1,234

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

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

493. 6.170 6.170 ↑ 1.0 1 1,234

Index Scan using precatorio_participantes_pkey on precatorio_participantes precatorio_participantes_14 (cost=0.28..8.30 rows=1 width=32) (actual time=0.005..0.005 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_15 (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_14.precatorio_id)
495. 7.404 7.404 ↑ 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.005..0.006 rows=1 loops=1,234)

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

497. 12.340 989.668 ↓ 2.3 7 1,234

Nested Loop (cost=33.45..148.20 rows=3 width=58) (actual time=0.471..0.802 rows=7 loops=1,234)

  • Join Filter: (evento_financeiros_10.tipo_evento_financeiro_id = tipo_evento_financeiros_10.id)
  • Rows Removed by Join Filter: 21
498. 444.240 977.328 ↓ 1.2 7 1,234

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

  • Hash Cond: (rubrica_eventos_9.evento_financeiro_id = evento_financeiros_10.id)
499. 364.030 364.030 ↑ 1.0 3,944 1,234

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

500. 3.702 169.058 ↑ 1.0 2 1,234

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

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

Seq Scan on evento_financeiros evento_financeiros_10 (cost=0.00..33.42 rows=2 width=36) (actual time=0.066..0.134 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.005 0.005 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_10 (cost=0.00..1.09 rows=4 width=30) (actual time=0.004..0.005 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_9 (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_9.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_12 (cost=0.28..0.38 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=8,228)

  • Index Cond: (id = precatorios_15.processo_principal_id)
506. 0.008 4.836 ↑ 22.2 79 1

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

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

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

508. 0.142 4.814 ↑ 22.2 79 1

Sort (cost=929.05..933.43 rows=1,751 width=68) (actual time=4.806..4.814 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.218 4.672 ↑ 22.2 79 1

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

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

511. 0.021 4.272 ↑ 22.2 79 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 25kB
512. 0.115 4.251 ↑ 22.2 79 1

Hash Right Join (cost=712.86..734.95 rows=1,751 width=76) (actual time=4.094..4.251 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.055 0.055 ↑ 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.055 rows=793 loops=1)

514. 0.033 4.081 ↑ 22.2 79 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 25kB
515. 0.028 4.048 ↑ 22.2 79 1

Hash Join (cost=531.78..686.60 rows=1,751 width=80) (actual time=3.422..4.048 rows=79 loops=1)

  • Hash Cond: (rubrica_eventos_4.tipo_rubrica_id = tipo_rubricas_4.id)
516. 0.337 4.007 ↑ 22.2 79 1

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

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

518. 0.007 3.395 ↑ 27.4 20 1

Hash (cost=523.14..523.14 rows=548 width=72) (actual time=3.395..3.395 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
519. 0.012 3.388 ↑ 27.4 20 1

Hash Join (cost=264.20..523.14 rows=548 width=72) (actual time=2.061..3.388 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.tipo_papel_id = tipo_papeis_5.id)
520. 0.018 3.371 ↑ 27.4 20 1

Hash Join (cost=263.06..514.47 rows=548 width=72) (actual time=2.050..3.371 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.participante_id = participantes_8.id)
521. 0.016 2.172 ↑ 27.4 20 1

Hash Join (cost=133.37..377.24 rows=548 width=52) (actual time=0.860..2.172 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.precatorio_id = precatorios_10.id)
522. 0.597 1.583 ↑ 27.4 20 1

Hash Join (cost=48.44..284.78 rows=548 width=44) (actual time=0.278..1.583 rows=20 loops=1)

  • Hash Cond: (precatorio_participantes_9.id = evento_financeiros_5.precatorio_participante_id)
523. 0.727 0.727 ↑ 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.727 rows=7,524 loops=1)

524. 0.009 0.259 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
525. 0.147 0.250 ↑ 27.4 20 1

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

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

527. 0.002 0.007 ↑ 1.0 4 1

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

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

  • Filter: pagamento
  • Rows Removed by Filter: 5
529. 0.230 0.573 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
530. 0.343 0.343 ↑ 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.343 rows=1,908 loops=1)

531. 0.601 1.181 ↑ 1.0 3,142 1

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

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

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

533. 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
534. 0.004 0.004 ↑ 1.0 6 1

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

535. 0.009 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.004 0.004 ↑ 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.004 rows=35 loops=1)

537. 0.001 0.008 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
538. 0.002 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.005 0.005 ↑ 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.005..0.005 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=8) (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=8) (actual time=0.006..0.008 rows=3 loops=1)

542. 0.239 0.457 ↑ 1.0 1,908 1

Hash (cost=61.08..61.08 rows=1,908 width=8) (actual time=0.457..0.457 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.004..0.218 rows=1,908 loops=1)

Planning time : 56.779 ms
Execution time : 5,385.224 ms