explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WDJ6

Settings
# exclusive inclusive rows x rows loops node
1. 3.161 2,254.083 ↑ 15.5 1,494 1

Hash Right Join (cost=798,917.90..1,663,634.04 rows=23,231 width=1,147) (actual time=1,493.059..2,254.083 rows=1,494 loops=1)

  • Hash Cond: (quitacao_saldo_precatorio.precatorios_id = precatorios.id)
2. 0.093 2,127.165 ↑ 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,367.230..2,127.165 rows=360 loops=1)

3. 6.969 2,127.072 ↑ 3.0 360 1

GroupAggregate (cost=784,932.33..1,645,951.50 rows=1,063 width=65) (actual time=1,367.228..2,127.072 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))
4. 4.638 1,365.543 ↓ 4.8 5,052 1

Sort (cost=784,932.33..784,934.99 rows=1,063 width=65) (actual time=1,364.850..1,365.543 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
5. 0.720 1,360.905 ↓ 4.8 5,052 1

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

  • Hash Cond: (precatorio_participantes.orcamentario_id = orcamentarios.id)
6. 1.041 1,360.184 ↓ 4.8 5,052 1

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

  • Hash Cond: (precatorio_participantes.rpv_id = rpvs.id)
7. 0.885 1,358.367 ↓ 4.8 5,052 1

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

  • Hash Cond: (precatorios_1.id = precatorio_participantes.precatorio_id)
8. 0.340 1,355.378 ↓ 2.2 596 1

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

  • Hash Cond: (precatorios_1.id = ultimos_eventos_financeiros_saldo_participantes_precatorios.precatorios_id)
9. 0.694 10.190 ↑ 1.8 1,472 1

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

  • Group Key: processo_principais.numero_processo, precatorios_1.id
10. 4.208 9.496 ↑ 1.0 2,656 1

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

  • Sort Key: processo_principais.numero_processo, precatorios_1.id
  • Sort Method: quicksort Memory: 304kB
11. 0.798 5.288 ↑ 1.0 2,656 1

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

  • Hash Cond: (precatorio_participantes_1.participante_id = participantes_1.id)
12. 0.739 3.670 ↑ 1.0 2,656 1

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

  • Hash Cond: (precatorio_participantes_1.precatorio_id = precatorios_1.id)
13. 1.178 1.178 ↑ 1.0 2,656 1

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

  • Filter: credor
  • Rows Removed by Filter: 4868
14. 0.291 1.753 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
15. 0.580 1.462 ↑ 1.0 1,908 1

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

  • Hash Cond: (precatorios_1.processo_principal_id = processo_principais.id)
16. 0.232 0.232 ↑ 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.232 rows=1,908 loops=1)

17. 0.329 0.650 ↑ 1.0 2,064 1

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

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

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

19. 0.353 0.820 ↑ 1.0 3,142 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 155kB
20. 0.467 0.467 ↑ 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.467 rows=3,142 loops=1)

21. 0.095 1,344.848 ↓ 29.8 596 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 57kB
22. 0.102 1,344.753 ↓ 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,344.601..1,344.753 rows=596 loops=1)

23. 1.228 1,344.651 ↓ 29.8 596 1

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

  • Sort Key: tab1.numero_processo_principal DESC, tab1.participantes_nome
  • Sort Method: quicksort Memory: 115kB
24. 2.915 1,343.423 ↓ 29.8 596 1

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

  • Filter: (tab1.data_evento_id = (SubPlan 3))
  • Rows Removed by Filter: 638
25. 3.167 41.106 ↑ 3.2 1,234 1

GroupAggregate (cost=1,641.59..1,828.93 rows=3,944 width=151) (actual time=37.075..41.106 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
26. 5.493 37.939 ↑ 1.0 3,944 1

Sort (cost=1,641.59..1,651.45 rows=3,944 width=151) (actual time=37.063..37.939 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
27. 1.022 32.446 ↑ 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.979..32.446 rows=3,944 loops=1)

28. 11.585 31.424 ↑ 1.0 3,944 1

Sort (cost=1,356.73..1,366.59 rows=3,944 width=141) (actual time=30.977..31.424 rows=3,944 loops=1)

  • Sort Key: precatorios_2.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
29. 7.218 19.839 ↑ 1.0 3,944 1

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

  • Hash Cond: (precatorios_2.processo_principal_id = processo_principais_1.id)
30. 1.644 11.966 ↑ 1.0 3,944 1

Hash Right Join (cost=885.28..909.61 rows=3,944 width=124) (actual time=10.200..11.966 rows=3,944 loops=1)

  • Hash Cond: ((configuracao_rubrica_precatorios.precatorio_id = precatorios_2.id) AND (configuracao_rubrica_precatorios.tipo_rubrica_id = tipo_rubricas.id))
31. 0.144 0.144 ↑ 1.0 793 1

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

32. 1.352 10.178 ↑ 1.0 3,944 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 724kB
33. 1.122 8.826 ↑ 1.0 3,944 1

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

  • Hash Cond: (rubrica_eventos.tipo_rubrica_id = tipo_rubricas.id)
34. 1.506 7.689 ↑ 1.0 3,944 1

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

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

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

36. 0.415 5.702 ↑ 1.0 1,234 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 208kB
37. 0.372 5.287 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.tipo_papel_id = tipo_papeis_1.id)
38. 0.403 4.909 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.participante_id = participantes_2.id)
39. 0.312 3.519 ↑ 1.0 1,234 1

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

  • Hash Cond: (precatorio_participantes_2.precatorio_id = precatorios_2.id)
40. 0.358 2.574 ↑ 1.0 1,234 1

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

  • Hash Cond: (evento_financeiros.tipo_evento_financeiro_id = tipo_evento_financeiros.id)
41. 0.988 2.202 ↑ 1.0 1,234 1

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

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

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

43. 0.185 0.418 ↑ 1.0 1,234 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
44. 0.233 0.233 ↑ 1.0 1,234 1

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

45. 0.005 0.014 ↑ 1.0 9 1

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

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

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

47. 0.254 0.633 ↑ 1.0 1,908 1

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

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

49. 0.478 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
50. 0.509 0.509 ↑ 1.0 3,142 1

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

51. 0.004 0.006 ↑ 1.0 6 1

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

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

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

53. 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
54. 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)

55. 0.287 0.655 ↑ 1.0 2,064 1

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

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

57.          

SubPlan (for Subquery Scan)

58. 3.702 1,299.402 ↑ 1.0 1 1,234

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

59. 7.404 1,295.700 ↑ 1.5 2 1,234

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

  • 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
60. 22.212 1,288.296 ↓ 2.3 7 1,234

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

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

Subquery Scan on precatorios_eventos_rubricas_4 (cost=197.96..198.00 rows=3 width=143) (actual time=1.024..1.026 rows=7 loops=1,234)

62. 25.914 1,263.616 ↓ 2.3 7 1,234

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

  • Sort Key: precatorios_9.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: 25kB
63. 32.904 1,237.702 ↓ 2.3 7 1,234

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

64. 114.762 1,188.342 ↓ 2.3 7 1,234

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

  • Hash Cond: ((configuracao_rubrica_precatorios_4.precatorio_id = precatorios_9.id) AND (configuracao_rubrica_precatorios_4.tipo_rubrica_id = tipo_rubricas_4.id))
65. 69.104 69.104 ↑ 1.0 793 1,234

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

66. 4.936 1,004.476 ↓ 2.3 7 1,234

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

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

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

68. 2.468 979.796 ↓ 2.3 7 1,234

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

69. 3.702 23.446 ↑ 1.0 1 1,234

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

  • Join Filter: (precatorio_participantes_9.tipo_papel_id = tipo_papeis_5.id)
  • Rows Removed by Join Filter: 5
70. 1.234 17.276 ↑ 1.0 1 1,234

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

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

72. 6.170 6.170 ↑ 1.0 1 1,234

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

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

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

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

76. 12.340 953.882 ↓ 2.3 7 1,234

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

  • Join Filter: (evento_financeiros_5.tipo_evento_financeiro_id = tipo_evento_financeiros_5.id)
  • Rows Removed by Join Filter: 21
77. 424.496 941.542 ↓ 1.2 7 1,234

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

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

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

79. 2.468 161.654 ↑ 1.0 2 1,234

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

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

Seq Scan on evento_financeiros evento_financeiros_5 (cost=0.00..33.42 rows=2 width=36) (actual time=0.064..0.129 rows=2 loops=1,234)

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

82. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on tipo_evento_financeiros tipo_evento_financeiros_5 (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
83. 16.456 16.456 ↑ 1.0 1 8,228

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

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

  • Index Cond: (id = precatorios_9.processo_principal_id)
85. 1.014 2.104 ↑ 1.0 7,524 1

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

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

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

87. 0.323 0.776 ↑ 1.0 2,140 1

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

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

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

89. 0.000 0.001 ↓ 0.0 0 1

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

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

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

91.          

SubPlan (for GroupAggregate)

92. 0.720 754.560 ↑ 1.0 1 360

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

93. 1.800 753.840 ↓ 0.0 0 360

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

  • Sort Key: tab1_1.numero_processo_principal DESC, tab1_1.participantes_nome
  • Sort Method: quicksort Memory: 25kB
94. 0.160 752.040 ↓ 0.0 0 360

Subquery Scan on tab1_1 (cost=413.31..809.86 rows=1 width=61) (actual time=2.056..2.089 rows=0 loops=360)

  • Filter: (tab1_1.data_evento_id = (SubPlan 1))
  • Rows Removed by Filter: 0
95. 3.240 728.280 ↓ 0.0 0 360

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

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

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

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

Subquery Scan on precatorios_eventos_rubricas_3 (cost=413.27..413.30 rows=2 width=151) (actual time=1.989..1.993 rows=11 loops=360)

98. 12.240 716.040 ↓ 5.5 11 360

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

  • Sort Key: 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: 56kB
99. 15.608 703.800 ↓ 5.5 11 360

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

  • Join Filter: ((precatorios_8.id = configuracao_rubrica_precatorios_3.precatorio_id) AND (tipo_rubricas_3.id = configuracao_rubrica_precatorios_3.tipo_rubrica_id))
  • Rows Removed by Join Filter: 39
100. 1.472 656.640 ↓ 5.5 11 360

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

101. 1.080 647.280 ↓ 5.5 11 360

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

102. 2.520 2.520 ↑ 1.0 1 360

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

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

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

104. 125.640 632.160 ↓ 5.5 11 360

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

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

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

106. 1.080 403.200 ↓ 3.0 3 360

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

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

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

  • Join Filter: (precatorio_participantes_8.tipo_papel_id = tipo_papeis_4.id)
  • Rows Removed by Join Filter: 17
108. 1.132 397.800 ↓ 3.0 3 360

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

109. 1.852 394.200 ↓ 3.0 3 360

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

110. 40.680 389.880 ↓ 3.0 3 360

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

  • Hash Cond: (evento_financeiros_4.precatorio_participante_id = precatorio_participantes_8.id)
111. 32.400 32.400 ↑ 1.0 1,234 360

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

112. 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
113. 315.720 315.720 ↑ 1.0 4 360

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

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

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

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

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

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

117. 7.888 7.888 ↑ 1.0 1 3,944

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

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

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

  • Index Cond: (id = precatorios_8.processo_principal_id)
119. 2.392 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)

120. 29.160 29.160 ↑ 1.0 2 360

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

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

SubPlan (for Subquery Scan)

122. 0.100 23.600 ↑ 1.0 1 20

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

123. 0.220 23.500 ↑ 1.0 3 20

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

  • 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
124. 0.640 23.280 ↓ 4.0 12 20

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

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

Subquery Scan on precatorios_eventos_rubricas_2 (cost=197.96..198.00 rows=3 width=143) (actual time=1.128..1.132 rows=12 loops=20)

126. 0.880 22.540 ↓ 4.0 12 20

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

  • Sort Key: precatorios_7.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: 32kB
127. 0.858 21.660 ↓ 4.0 12 20

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

128. 2.120 20.320 ↓ 4.0 12 20

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

  • Hash Cond: ((configuracao_rubrica_precatorios_2.precatorio_id = precatorios_7.id) AND (configuracao_rubrica_precatorios_2.tipo_rubrica_id = tipo_rubricas_2.id))
129. 1.100 1.100 ↑ 1.0 793 20

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

130. 0.160 17.100 ↓ 4.0 12 20

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

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

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

132. 0.060 16.440 ↓ 4.0 12 20

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

133. 0.100 0.520 ↑ 1.0 1 20

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

  • Join Filter: (precatorio_participantes_7.tipo_papel_id = tipo_papeis_3.id)
  • Rows Removed by Join Filter: 5
134. 0.040 0.380 ↑ 1.0 1 20

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

135. 0.060 0.280 ↑ 1.0 1 20

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

136. 0.160 0.160 ↑ 1.0 1 20

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

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

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

  • Index Cond: (id = precatorio_participantes_7.precatorio_id)
138. 0.060 0.060 ↑ 1.0 1 20

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

  • Index Cond: (id = precatorio_participantes_7.participante_id)
139. 0.040 0.040 ↑ 1.0 6 20

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

140. 0.380 15.860 ↓ 4.0 12 20

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

  • Join Filter: (evento_financeiros_3.tipo_evento_financeiro_id = tipo_evento_financeiros_3.id)
  • Rows Removed by Join Filter: 52
141. 7.120 15.480 ↓ 2.7 16 20

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

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

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

143. 0.060 2.640 ↓ 2.0 4 20

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
144. 2.580 2.580 ↓ 2.0 4 20

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

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

146. 0.003 0.003 ↑ 1.0 4 1

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

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

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

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

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

  • Index Cond: (id = precatorios_7.processo_principal_id)
149. 2.764 123.757 ↑ 15.5 1,494 1

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

  • Buckets: 16384 Batches: 2 Memory Usage: 582kB
150. 0.999 120.993 ↑ 15.5 1,494 1

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

  • Merge Cond: (precatorios.id = pp.precatorio_id)
151. 1.141 108.956 ↑ 15.5 1,494 1

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

  • Merge Cond: (precatorios.id = agregacao_participantes_precatorio.precatorios_id)
152. 1.362 80.985 ↑ 3.9 1,494 1

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

  • Merge Cond: (precatorios.id = precatorios_5.id)
153. 0.808 42.986 ↑ 3.9 1,494 1

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

  • Merge Cond: (precatorios.id = precatorios_com_sequestro.precatorio_id)
154. 1.724 41.957 ↑ 3.9 1,494 1

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

  • Sort Key: precatorios.id
  • Sort Method: quicksort Memory: 866kB
155. 0.440 40.233 ↑ 3.9 1,494 1

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

  • Hash Cond: (precatorios.tipo_origem_informacao_id = tipo_origem_informacoes.id)
156. 0.358 39.784 ↑ 3.9 1,494 1

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

  • Hash Cond: (precatorios.modo_lancamento_valor_id = modo_lancamento_valores.id)
157. 0.414 39.422 ↑ 3.9 1,494 1

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

  • Hash Cond: ((max(prec_part_1.categoria_precatorio_id)) = categoria_precatorios.id)
158. 0.641 39.002 ↑ 3.9 1,494 1

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

  • Hash Cond: (precatorios_eventos_rubricas_1.precatorios_id = precatorios.id)
159. 0.017 4.886 ↑ 175.1 10 1

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

  • Group Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
160. 0.040 4.869 ↑ 22.2 79 1

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

  • Sort Key: precatorios_eventos_rubricas_1.numero_processo_principal, precatorios_eventos_rubricas_1.precatorios_id
  • Sort Method: quicksort Memory: 31kB
161. 0.012 4.829 ↑ 22.2 79 1

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

162. 0.165 4.817 ↑ 22.2 79 1

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

  • Sort Key: precatorios_3.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
163. 0.214 4.652 ↑ 22.2 79 1

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

  • Hash Cond: (processo_principais_2.id = precatorios_3.processo_principal_id)
164. 0.208 0.208 ↑ 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.007..0.208 rows=2,064 loops=1)

165. 0.017 4.230 ↑ 22.2 79 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 26kB
166. 0.125 4.213 ↑ 22.2 79 1

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

  • Hash Cond: ((configuracao_rubrica_precatorios_1.precatorio_id = precatorios_3.id) AND (configuracao_rubrica_precatorios_1.tipo_rubrica_id = tipo_rubricas_1.id))
167. 0.068 0.068 ↑ 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.068 rows=793 loops=1)

168. 0.017 4.020 ↑ 22.2 79 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 26kB
169. 0.021 4.003 ↑ 22.2 79 1

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

  • Hash Cond: (rubrica_eventos_1.tipo_rubrica_id = tipo_rubricas_1.id)
170. 0.389 3.967 ↑ 22.2 79 1

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

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

172. 0.009 3.182 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
173. 0.010 3.173 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.tipo_papel_id = tipo_papeis_2.id)
174. 0.017 3.157 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.participante_id = participantes_3.id)
175. 0.014 2.207 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.precatorio_id = precatorios_3.id)
176. 0.623 1.597 ↑ 27.4 20 1

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

  • Hash Cond: (precatorio_participantes_3.id = evento_financeiros_1.precatorio_participante_id)
177. 0.727 0.727 ↑ 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.003..0.727 rows=7,524 loops=1)

178. 0.007 0.247 ↑ 27.4 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
179. 0.125 0.240 ↑ 27.4 20 1

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

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

181. 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
182. 0.005 0.005 ↑ 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.005..0.005 rows=4 loops=1)

  • Filter: pagamento
  • Rows Removed by Filter: 5
183. 0.232 0.596 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 106kB
184. 0.364 0.364 ↑ 1.0 1,908 1

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

185. 0.483 0.933 ↑ 1.0 3,142 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 252kB
186. 0.450 0.450 ↑ 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.450 rows=3,142 loops=1)

187. 0.003 0.006 ↑ 1.0 6 1

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

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

189. 0.004 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
190. 0.011 0.011 ↑ 1.0 35 1

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

191. 0.953 33.475 ↑ 3.9 1,494 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 559kB
192. 1.077 32.522 ↑ 3.9 1,494 1

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

  • Hash Cond: (prec_part_1.precatorio_id = precatorios.id)
193. 4.332 16.681 ↑ 4.0 1,882 1

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

  • Group Key: prec_part_1.precatorio_id, proc.numero_processo
194. 3.061 12.349 ↑ 1.0 7,524 1

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

  • Sort Key: prec_part_1.precatorio_id, proc.numero_processo
  • Sort Method: quicksort Memory: 968kB
195. 1.932 9.288 ↑ 1.0 7,524 1

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

  • Hash Cond: (prec_part_1.participante_id = participantes_4.id)
196. 1.200 6.596 ↑ 1.0 7,524 1

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

  • Hash Cond: (prec_part_1.categoria_precatorio_id = cat.id)
197. 2.861 5.391 ↑ 1.0 7,524 1

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

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

199. 0.342 1.705 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
200. 0.592 1.363 ↑ 1.0 1,908 1

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

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

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

202. 0.277 0.566 ↑ 1.0 2,064 1

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

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

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

204. 0.001 0.005 ↑ 1.0 2 1

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

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

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

206. 0.357 0.760 ↑ 1.0 3,142 1

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

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

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

208. 0.773 14.764 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 485kB
209. 0.414 13.991 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.fase_id = fases.id)
210. 0.256 13.574 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.detalhe_natureza_precatorio_id = detalhe_natureza_precatorios.id)
211. 0.566 13.313 ↑ 1.0 1,494 1

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

  • Hash Cond: (prec_part.precatorio_id = precatorios.id)
212. 0.041 2.591 ↑ 1.0 160 1

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

  • Hash Cond: (prec_part.tipo_papel_id = tipo_papeis.id)
213. 0.052 2.545 ↑ 1.0 160 1

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

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

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

  • Filter: (encabecante IS TRUE)
  • Rows Removed by Filter: 7364
215. 0.870 1.408 ↑ 1.0 3,142 1

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

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

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

217. 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
218. 0.003 0.003 ↑ 1.0 6 1

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

219. 0.694 10.156 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 464kB
220. 0.674 9.462 ↑ 1.0 1,494 1

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

  • Hash Cond: (p_prin_p_int.processo_principal_id = proc_prin.id)
221. 0.813 4.220 ↑ 1.1 975 1

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

  • Group Key: p_prin_p_int.processo_principal_id, precatorios_4.id, p_prin.numero_processo
222. 0.522 3.407 ↑ 1.0 1,085 1

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

  • Sort Key: p_prin_p_int.processo_principal_id, precatorios_4.id, p_prin.numero_processo
  • Sort Method: quicksort Memory: 201kB
223. 0.300 2.885 ↑ 1.0 1,085 1

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

  • Hash Cond: (p_prin_p_int.processo_interno_id = p_int.id)
224. 0.457 2.276 ↑ 1.0 1,085 1

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

  • Hash Cond: (precatorios_4.processo_principal_id = p_prin.id)
225. 0.182 0.182 ↑ 1.0 1,908 1

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

226. 0.324 1.637 ↑ 1.0 1,085 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 110kB
227. 0.414 1.313 ↑ 1.0 1,085 1

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

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

229. 0.407 0.751 ↑ 1.0 2,064 1

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

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

231. 0.154 0.309 ↑ 1.0 1,125 1

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

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

233. 0.718 4.568 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 439kB
234. 0.358 3.850 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.responsavel_acompanhamento = usuarios.id)
235. 0.398 3.483 ↑ 1.0 1,494 1

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

  • Hash Cond: (precatorios.natureza_precatorio_id = natureza_precatorios.id)
236. 0.418 3.081 ↑ 1.0 1,494 1

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

  • Hash Cond: (proc_prin.departamento_responsavel_id = depto.id)
237. 0.461 2.656 ↑ 1.0 1,494 1

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

  • Hash Cond: (proc_prin.vara_id = varas.id)
238. 0.622 2.167 ↑ 1.0 1,494 1

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

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

240. 0.343 1.321 ↑ 1.0 1,494 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 226kB
241. 0.671 0.978 ↑ 1.0 1,494 1

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

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

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

243. 0.044 0.080 ↑ 1.0 223 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 39kB
244. 0.036 0.036 ↑ 1.0 223 1

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

245. 0.008 0.028 ↑ 1.0 23 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
246. 0.013 0.020 ↑ 1.0 23 1

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

  • Hash Cond: (varas.tribunal_id = tribunais.id)
247. 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)

248. 0.001 0.004 ↑ 1.0 4 1

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

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

250. 0.002 0.007 ↑ 1.0 11 1

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

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

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

252. 0.001 0.004 ↑ 1.0 4 1

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

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

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

254. 0.005 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
255. 0.004 0.004 ↑ 1.0 15 1

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

256. 0.003 0.005 ↑ 1.0 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
257. 0.002 0.002 ↑ 1.0 3 1

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

258. 0.002 0.003 ↑ 1.0 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
259. 0.001 0.001 ↑ 1.0 3 1

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

260. 0.001 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
261. 0.005 0.005 ↑ 1.0 2 1

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

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

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

264. 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
265. 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)

266. 0.007 0.221 ↓ 0.0 0 1

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

  • Sort Key: precatorios_com_sequestro.precatorio_id
  • Sort Method: quicksort Memory: 25kB
267. 0.001 0.214 ↓ 0.0 0 1

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

268. 0.001 0.213 ↓ 0.0 0 1

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

  • Group Key: precatorio_participantes_4.precatorio_id, true
269. 0.001 0.212 ↓ 0.0 0 1

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

270. 0.112 0.211 ↓ 0.0 0 1

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

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

272. 0.003 0.005 ↑ 1.0 1 1

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

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

  • Filter: sequestro
  • Rows Removed by Filter: 8
274. 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)
275. 0.671 36.637 ↑ 1.0 1,882 1

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

276. 20.654 35.966 ↑ 1.0 1,882 1

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

  • Group Key: precatorios_5.id
277. 3.508 15.312 ↓ 1.0 7,787 1

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

  • Sort Key: precatorios_5.id
  • Sort Method: quicksort Memory: 680kB
278. 1.835 11.804 ↓ 1.0 7,787 1

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

  • Hash Cond: (precatorio_participantes_5.rpv_id = rpvs_1.id)
279. 1.921 9.078 ↓ 1.0 7,787 1

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

  • Hash Cond: (precatorio_participantes_5.precatorio_id = precatorios_5.id)
280. 1.379 6.598 ↓ 1.0 7,787 1

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

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

  • Filter: (NOT preferencial)
  • Rows Removed by Filter: 306
282. 1.174 4.975 ↑ 1.0 7,524 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 441kB
283. 1.237 3.801 ↑ 1.0 7,524 1

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

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

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

  • Filter: preferencial
  • Rows Removed by Filter: 1043
285. 1.204 2.392 ↑ 1.0 7,524 1

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

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

287. 0.313 0.559 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 91kB
288. 0.246 0.246 ↑ 1.0 1,908 1

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

289. 0.430 0.891 ↑ 1.0 2,140 1

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

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

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

291. 1.294 26.830 ↑ 4.0 1,882 1

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

  • Sort Key: agregacao_participantes_precatorio.precatorios_id
  • Sort Method: quicksort Memory: 621kB
292. 0.237 25.536 ↑ 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.365..25.536 rows=1,882 loops=1)

293. 4.160 25.299 ↑ 4.0 1,882 1

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

  • Group Key: processo_principais_3.numero_processo, precatorios_6.id
294. 13.381 21.139 ↑ 1.0 7,524 1

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

  • Sort Key: processo_principais_3.numero_processo, precatorios_6.id
  • Sort Method: quicksort Memory: 1271kB
295. 2.041 7.758 ↑ 1.0 7,524 1

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

  • Hash Cond: (precatorio_participantes_6.participante_id = participantes_5.id)
296. 2.113 4.603 ↑ 1.0 7,524 1

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

  • Hash Cond: (precatorio_participantes_6.precatorio_id = precatorios_6.id)
297. 0.811 0.811 ↑ 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.003..0.811 rows=7,524 loops=1)

298. 0.293 1.679 ↑ 1.0 1,908 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 139kB
299. 0.559 1.386 ↑ 1.0 1,908 1

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

  • Hash Cond: (precatorios_6.processo_principal_id = processo_principais_3.id)
300. 0.219 0.219 ↑ 1.0 1,908 1

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

301. 0.301 0.608 ↑ 1.0 2,064 1

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

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

303. 0.558 1.114 ↑ 1.0 3,142 1

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

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

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

305. 0.348 11.038 ↑ 1.2 1,628 1

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

306. 6.237 10.690 ↑ 1.2 1,628 1

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

  • Group Key: pp.precatorio_id
307. 1.045 4.453 ↑ 1.0 2,825 1

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

  • Sort Key: pp.precatorio_id
  • Sort Method: quicksort Memory: 317kB
308. 0.830 3.408 ↑ 1.0 2,825 1

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

  • Hash Cond: (depre.precatorio_participante_id = pp.id)
309. 0.335 0.335 ↑ 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.009..0.335 rows=2,825 loops=1)

310. 1.009 2.243 ↑ 1.0 7,524 1

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

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

Seq Scan on precatorio_participantes pp (cost=0.00..193.24 rows=7,524 width=16) (actual time=0.004..1.234 rows=7,524 loops=1)

Planning time : 30.005 ms
Execution time : 2,256.359 ms