explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TxQs

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 3,249.017 ↓ 10.0 10 1

Limit (cost=1,345.28..1,345.28 rows=1 width=320) (actual time=3,249.017..3,249.017 rows=10 loops=1)

2.          

Initplan (forLimit)

3. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on tb_tipo_customizacao (cost=0.00..1.66 rows=1 width=3) (actual time=0.008..0.012 rows=1 loops=1)

  • Filter: ((id_customizacao = 20) AND (ativo = 'S'::bpchar))
  • Rows Removed by Filter: 43
4. 0.000 0.012 ↑ 1.0 1 1

Aggregate (cost=16.60..16.61 rows=1 width=0) (actual time=0.012..0.012 rows=1 loops=1)

5.          

Initplan (forAggregate)

6. 0.008 0.008 ↓ 0.0 0 1

Index Scan using pk_tb_convenio_edicao on tb_convenio_edicao (cost=0.28..8.30 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (id_convenio_edicao = 55452)
7. 0.010 0.010 ↓ 0.0 0 1

Index Only Scan using idx_tb_plt_convenio_id_convenio on tb_plt_convenio (cost=0.28..8.30 rows=1 width=0) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (id_convenio = $15)
  • Heap Fetches: 0
8. 2.154 3,249.000 ↓ 120.0 120 1

Sort (cost=1,327.01..1,327.01 rows=1 width=320) (actual time=3,248.995..3,249.000 rows=120 loops=1)

  • Sort Key: ipdc.dt_prestacao, forn.ds_razao_social, ipdc.vlr_despesa
  • Sort Method: quicksort Memory: 141kB
9. 20.158 3,246.846 ↓ 225.0 225 1

Nested Loop Left Join (cost=20.22..1,327.00 rows=1 width=320) (actual time=13.340..3,246.846 rows=225 loops=1)

10. 0.623 13.812 ↓ 225.0 225 1

Nested Loop Left Join (cost=20.08..51.83 rows=1 width=303) (actual time=0.259..13.812 rows=225 loops=1)

11. 0.685 11.164 ↓ 225.0 225 1

Nested Loop Left Join (cost=19.81..50.38 rows=1 width=281) (actual time=0.249..11.164 rows=225 loops=1)

12. 0.808 9.354 ↓ 225.0 225 1

Nested Loop Left Join (cost=19.67..50.19 rows=1 width=251) (actual time=0.243..9.354 rows=225 loops=1)

13. 0.906 7.421 ↓ 225.0 225 1

Nested Loop Left Join (cost=19.40..49.17 rows=1 width=221) (actual time=0.234..7.421 rows=225 loops=1)

14. 0.952 4.265 ↓ 225.0 225 1

Nested Loop Left Join (cost=19.11..43.10 rows=1 width=164) (actual time=0.223..4.265 rows=225 loops=1)

15. 0.580 1.513 ↓ 225.0 225 1

Nested Loop (cost=18.83..38.90 rows=1 width=156) (actual time=0.213..1.513 rows=225 loops=1)

16. 0.004 0.036 ↑ 1.0 1 1

Nested Loop (cost=0.58..16.63 rows=1 width=24) (actual time=0.032..0.036 rows=1 loops=1)

17. 0.020 0.020 ↑ 1.0 1 1

Index Scan using pk_tb_ed_item_pdc on tb_edicao_pdc epdc (cost=0.29..8.31 rows=1 width=8) (actual time=0.018..0.020 rows=1 loops=1)

  • Index Cond: (id_edicao_pdc = 55452)
18. 0.012 0.012 ↑ 1.0 1 1

Index Scan using idx_id_prestacao_contas1 on tb_prestacao_contas pdc (cost=0.29..8.31 rows=1 width=16) (actual time=0.010..0.012 rows=1 loops=1)

  • Index Cond: (id_prestacao_contas = epdc.id_prestacao_contas)
19. 0.766 0.897 ↓ 225.0 225 1

Bitmap Heap Scan on tb_item_pdc ipdc (cost=18.25..22.27 rows=1 width=140) (actual time=0.173..0.897 rows=225 loops=1)

  • Recheck Cond: ((id_prestacao_contas = pdc.id_prestacao_contas) AND (id_edicao_pdc = 55452))
  • Filter: (NOT (hashed SubPlan 24))
20. 0.010 0.121 ↓ 0.0 0 1

BitmapAnd (cost=9.80..9.80 rows=1 width=0) (actual time=0.121..0.121 rows=0 loops=1)

21. 0.070 0.070 ↓ 1.2 450 1

Bitmap Index Scan on fki_id_prestacao_contas (cost=0.00..4.11 rows=362 width=0) (actual time=0.070..0.070 rows=450 loops=1)

  • Index Cond: (id_prestacao_contas = pdc.id_prestacao_contas)
22. 0.041 0.041 ↓ 1.7 225 1

Bitmap Index Scan on idx_id_edicao_pdc (cost=0.00..5.42 rows=133 width=0) (actual time=0.041..0.041 rows=225 loops=1)

  • Index Cond: (id_edicao_pdc = 55452)
23.          

SubPlan (forBitmap Heap Scan)

24. 0.010 0.010 ↓ 0.0 0 1

Index Scan using idx_tb_status_item_pdc_id_status_item on tb_status_item_pdc tb_status_item_pdc_8 (cost=0.43..8.45 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (id_status_item = 4)
25. 1.800 1.800 ↓ 0.0 0 225

Index Scan using idx_tb_pdc_movto on tb_pdc_movto pmovto (cost=0.29..4.18 rows=1 width=12) (actual time=0.008..0.008 rows=0 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
26. 2.250 2.250 ↑ 1.0 1 225

Index Scan using pk_tb_fornecedor on tb_fornecedor forn (cost=0.29..6.06 rows=1 width=61) (actual time=0.008..0.010 rows=1 loops=225)

  • Index Cond: (ipdc.id_fornecedor = id_fornecedor)
27. 1.125 1.125 ↑ 1.0 1 225

Index Scan using idx_id_item_despesa1 on tb_item_despesa item_desp (cost=0.27..1.02 rows=1 width=30) (actual time=0.004..0.005 rows=1 loops=225)

  • Index Cond: (ipdc.id_item_despesa = id_item_despesa)
28. 1.125 1.125 ↑ 1.0 1 225

Index Scan using pk_tb_despesas on tb_despesa desp (cost=0.14..0.18 rows=1 width=30) (actual time=0.004..0.005 rows=1 loops=225)

  • Index Cond: (id_despesa = item_desp.id_despesa)
29. 2.025 2.025 ↑ 1.0 1 225

Index Scan using pk_tb_usuario on tb_usuario usu (cost=0.28..1.44 rows=1 width=30) (actual time=0.006..0.009 rows=1 loops=225)

  • Index Cond: (id_usuario = ipdc.id_usu_analise)
30. 1.575 1.575 ↑ 1.0 1 225

Index Scan using pk_tb_tipo_doc on tb_tipo_doc doc (cost=0.14..0.33 rows=1 width=21) (actual time=0.004..0.007 rows=1 loops=225)

  • Index Cond: (id_tipo_doc = ipdc.id_tipo_doc)
31.          

SubPlan (forNested Loop Left Join)

32. 2.700 2.700 ↑ 1.0 1 225

Index Scan using pk_tb_item_prestacao_contas on tb_item_pdc (cost=0.43..8.45 rows=1 width=116) (actual time=0.012..0.012 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_tb_item_prestacao_contas on tb_item_pdc tb_item_pdc_2 (cost=23.93..31.95 rows=1 width=116) (never executed)

  • Index Cond: (id_item_pdc = $2)
34.          

Initplan (forIndex Scan)

35. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=23.49..23.50 rows=1 width=4) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_id_item on tb_item_pdc tb_item_pdc_1 (cost=0.43..23.49 rows=2 width=4) (never executed)

  • Index Cond: (id_item = ipdc.id_item)
  • Filter: ((ds_analise IS NOT NULL) AND (ds_analise <> ''::text))
37. 0.675 0.675 ↑ 1.0 1 225

Index Scan using pk_tb_item_prestacao_contas on tb_item_pdc tb_item_pdc_3 (cost=0.43..8.45 rows=1 width=116) (actual time=0.003..0.003 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
38. 1.125 3.825 ↑ 1.0 1 225

Aggregate (cost=8.48..8.49 rows=1 width=4) (actual time=0.017..0.017 rows=1 loops=225)

39. 2.700 2.700 ↑ 2.0 1 225

Index Only Scan using fki_id_item_pdc on tb_status_item_pdc (cost=0.43..8.48 rows=2 width=4) (actual time=0.011..0.012 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Heap Fetches: 249
40. 1.015 1.640 ↑ 2.0 1 205

Hash Join (cost=1.56..9.64 rows=2 width=9) (actual time=0.007..0.008 rows=1 loops=205)

  • Hash Cond: (stp.id_status_item = st.id_status_item)
41. 0.615 0.615 ↑ 2.0 1 205

Index Scan using fki_id_item_pdc on tb_status_item_pdc stp (cost=0.43..8.48 rows=2 width=4) (actual time=0.003..0.003 rows=1 loops=205)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
42. 0.002 0.010 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
43. 0.008 0.008 ↑ 1.0 6 1

Seq Scan on tb_status_item st (cost=0.00..1.06 rows=6 width=13) (actual time=0.005..0.008 rows=6 loops=1)

44. 0.675 1.350 ↑ 1.0 1 225

Aggregate (cost=8.48..8.49 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=225)

45. 0.675 0.675 ↑ 2.0 1 225

Index Only Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_1 (cost=0.43..8.48 rows=2 width=4) (actual time=0.003..0.003 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Heap Fetches: 249
46. 0.610 1.230 ↑ 2.0 1 205

Hash Join (cost=1.56..9.64 rows=2 width=4) (actual time=0.005..0.006 rows=1 loops=205)

  • Hash Cond: (stp_1.id_status_item = st_1.id_status_item)
47. 0.615 0.615 ↑ 2.0 1 205

Index Scan using fki_id_item_pdc on tb_status_item_pdc stp_1 (cost=0.43..8.48 rows=2 width=4) (actual time=0.002..0.003 rows=1 loops=205)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
48. 0.003 0.005 ↑ 1.0 6 1

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

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

Seq Scan on tb_status_item st_1 (cost=0.00..1.06 rows=6 width=4) (actual time=0.001..0.002 rows=6 loops=1)

50. 0.675 1.575 ↑ 1.0 1 225

Aggregate (cost=8.49..8.50 rows=1 width=6) (actual time=0.007..0.007 rows=1 loops=225)

51. 0.900 0.900 ↑ 1.0 1 225

Index Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_2 (cost=0.43..8.48 rows=1 width=6) (actual time=0.003..0.004 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Filter: (id_status_item = 1)
  • Rows Removed by Filter: 0
52. 0.225 1.125 ↑ 1.0 1 225

Aggregate (cost=8.49..8.50 rows=1 width=6) (actual time=0.005..0.005 rows=1 loops=225)

53. 0.900 0.900 ↓ 0.0 0 225

Index Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_3 (cost=0.43..8.48 rows=1 width=6) (actual time=0.004..0.004 rows=0 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Filter: (id_status_item = 2)
  • Rows Removed by Filter: 1
54. 0.450 1.125 ↑ 1.0 1 225

Aggregate (cost=8.49..8.50 rows=1 width=6) (actual time=0.005..0.005 rows=1 loops=225)

55. 0.675 0.675 ↓ 0.0 0 225

Index Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_4 (cost=0.43..8.48 rows=1 width=6) (actual time=0.003..0.003 rows=0 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Filter: (id_status_item = 5)
  • Rows Removed by Filter: 1
56. 0.450 1.125 ↑ 1.0 1 225

Aggregate (cost=8.49..8.50 rows=1 width=6) (actual time=0.005..0.005 rows=1 loops=225)

57. 0.675 0.675 ↓ 0.0 0 225

Index Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_5 (cost=0.43..8.48 rows=1 width=6) (actual time=0.003..0.003 rows=0 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Filter: (id_status_item = 6)
  • Rows Removed by Filter: 1
58. 1.800 1.800 ↑ 1.0 1 225

Seq Scan on tb_tipo_doc_unidade (cost=0.00..1.21 rows=1 width=2) (actual time=0.007..0.008 rows=1 loops=225)

  • Filter: ((id_tipo_doc = ipdc.id_tipo_doc) AND (flg_status = 'A'::bpchar) AND (id_unidade_adm = 2))
  • Rows Removed by Filter: 11
59. 0.900 1.575 ↑ 1.0 1 225

Aggregate (cost=8.48..8.49 rows=1 width=6) (actual time=0.007..0.007 rows=1 loops=225)

60. 0.675 0.675 ↑ 2.0 1 225

Index Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_6 (cost=0.43..8.48 rows=2 width=6) (actual time=0.003..0.003 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
61. 0.675 6.525 ↑ 1.0 1 225

Result (cost=16.73..16.75 rows=1 width=0) (actual time=0.029..0.029 rows=1 loops=225)

62.          

Initplan (forResult)

63. 1.800 5.850 ↑ 1.0 1 225

Aggregate (cost=16.72..16.73 rows=1 width=0) (actual time=0.026..0.026 rows=1 loops=225)

64. 0.450 4.050 ↓ 0.0 0 225

HashAggregate (cost=16.70..16.71 rows=1 width=60) (actual time=0.018..0.018 rows=0 loops=225)

65. 1.125 3.600 ↓ 0.0 0 225

Nested Loop (cost=8.64..16.70 rows=1 width=60) (actual time=0.016..0.016 rows=0 loops=225)

66. 1.350 2.250 ↑ 1.0 1 225

HashAggregate (cost=8.49..8.50 rows=1 width=10) (actual time=0.010..0.010 rows=1 loops=225)

67. 0.900 0.900 ↑ 2.0 1 225

Index Scan using fki_id_item_pdc on tb_status_item_pdc sip (cost=0.43..8.48 rows=2 width=10) (actual time=0.003..0.004 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
68. 0.225 0.225 ↓ 0.0 0 225

Index Scan using pk_tb_pdc_fr on tb_pdc_fr (cost=0.15..8.18 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=225)

  • Index Cond: (id_pdc_fr = sip.id_pdc_fr)
  • Filter: ((id_item_pdc = ipdc.id_item_pdc) AND CASE WHEN ((sum(sip.vlr_item)) <> valor) THEN true ELSE false END)
69. 303.749 3,166.425 ↓ 70.0 70 225

Nested Loop (cost=264.26..1,598.86 rows=1 width=4) (actual time=12.726..14.073 rows=70 loops=225)

  • Join Filter: (i.id_item_despesa = du.id_item_despesa)
  • Rows Removed by Join Filter: 11476
70. 9.900 9.900 ↓ 1.4 66 225

Seq Scan on tb_despesa_unidade du (cost=0.00..9.55 rows=48 width=8) (actual time=0.006..0.044 rows=66 loops=225)

  • Filter: ((id_despesa = item_desp.id_despesa) AND (id_unidade_adm = 2))
  • Rows Removed by Filter: 104
71. 143.101 2,852.776 ↓ 14.5 174 14,936

Materialize (cost=264.26..1,580.70 rows=12 width=12) (actual time=0.152..0.191 rows=174 loops=14,936)

72. 20.623 2,709.675 ↓ 12.8 153 225

Nested Loop (cost=264.26..1,580.64 rows=12 width=12) (actual time=10.088..12.043 rows=153 loops=225)

73. 5.850 2,620.350 ↓ 12.8 153 225

Nested Loop (cost=263.99..1,576.95 rows=12 width=8) (actual time=10.064..11.646 rows=153 loops=225)

74. 1.350 1.350 ↑ 1.0 1 225

Seq Scan on tb_despesa d (cost=0.00..1.14 rows=1 width=4) (actual time=0.002..0.006 rows=1 loops=225)

  • Filter: (id_despesa = item_desp.id_despesa)
  • Rows Removed by Filter: 10
75. 755.482 2,613.150 ↓ 12.8 153 225

Hash Join (cost=263.99..1,575.70 rows=12 width=8) (actual time=10.057..11.614 rows=153 loops=225)

  • Hash Cond: (desp_1.id_subitem_plt = sub.id_subitem_plt)
76. 1,324.800 1,857.375 ↓ 2.7 27,692 225

Bitmap Heap Scan on tb_desp_subitem desp_1 (cost=201.30..1,473.75 rows=10,436 width=12) (actual time=2.528..8.255 rows=27,692 loops=225)

  • Recheck Cond: (id_despesa = item_desp.id_despesa)
77. 532.575 532.575 ↓ 2.7 27,693 225

Bitmap Index Scan on idx_tb_desp_subitem_id_despesa (cost=0.00..198.69 rows=10,436 width=0) (actual time=2.367..2.367 rows=27,693 loops=225)

  • Index Cond: (id_despesa = item_desp.id_despesa)
78. 0.018 0.293 ↓ 2.4 19 1

Hash (cost=62.59..62.59 rows=8 width=4) (actual time=0.293..0.293 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
79. 0.014 0.275 ↓ 2.4 19 1

Nested Loop (cost=1.41..62.59 rows=8 width=4) (actual time=0.069..0.275 rows=19 loops=1)

80. 0.011 0.204 ↓ 2.7 19 1

Nested Loop (cost=1.12..59.89 rows=7 width=4) (actual time=0.059..0.204 rows=19 loops=1)

81. 0.005 0.121 ↓ 3.0 18 1

Nested Loop (cost=0.84..56.97 rows=6 width=4) (actual time=0.047..0.121 rows=18 loops=1)

82. 0.013 0.056 ↑ 1.0 6 1

Nested Loop (cost=0.56..54.30 rows=6 width=8) (actual time=0.030..0.056 rows=6 loops=1)

83. 0.019 0.019 ↑ 1.0 6 1

Index Scan using idx_tb_plt_convenio_id_convenio on tb_plt_convenio plt_conv (cost=0.28..8.44 rows=6 width=4) (actual time=0.018..0.019 rows=6 loops=1)

  • Index Cond: (id_convenio = 2373)
84. 0.024 0.024 ↑ 1.0 1 6

Index Only Scan using pk_tb_plano_trabalho on tb_plt_entidade plt (cost=0.28..7.63 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=6)

  • Index Cond: (id_plt_entidade = plt_conv.id_plt_entidade)
  • Heap Fetches: 6
85. 0.060 0.060 ↓ 3.0 3 6

Index Scan using idx_tb_plt_edicao_id_plt_entidade on tb_plt_edicao plt_ed (cost=0.28..0.43 rows=1 width=8) (actual time=0.007..0.010 rows=3 loops=6)

  • Index Cond: (id_plt_entidade = plt.id_plt_entidade)
  • Filter: (id_status_plt = 5)
  • Rows Removed by Filter: 2
86. 0.072 0.072 ↑ 1.0 1 18

Index Scan using idx_tb_item_plt_id_plt_edicao on tb_item_plt item (cost=0.28..0.48 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=18)

  • Index Cond: (id_plt_edicao = plt_ed.id_plt_edicao)
87. 0.057 0.057 ↑ 1.0 1 19

Index Scan using idx_tb_subitem_plt_id_item_plt on tb_subitem_plt sub (cost=0.28..0.38 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=19)

  • Index Cond: (id_item_plt = item.id_item_plt)
88. 68.702 68.702 ↑ 1.0 1 34,351

Index Only Scan using idx_id_item_despesa1 on tb_item_despesa i (cost=0.27..0.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=34,351)

  • Index Cond: (id_item_despesa = desp_1.id_item_despesa)
  • Heap Fetches: 34351
89. 0.067 17.256 ↓ 4.0 4 8

Nested Loop (cost=28.08..345.91 rows=1 width=4) (actual time=1.838..2.157 rows=4 loops=8)

90. 0.073 16.000 ↓ 4.0 4 8

Nested Loop (cost=27.80..345.51 rows=1 width=8) (actual time=1.827..2.000 rows=4 loops=8)

91. 0.076 15.840 ↓ 4.0 4 8

Nested Loop (cost=27.80..344.36 rows=1 width=16) (actual time=1.817..1.980 rows=4 loops=8)

  • Join Filter: (plt_conv_1.id_plt_entidade = plt_1.id_plt_entidade)
92. 2.960 15.648 ↓ 4.0 4 8

Nested Loop (cost=27.52..343.89 rows=1 width=24) (actual time=1.803..1.956 rows=4 loops=8)

  • Join Filter: (ped.id_plt_entidade = plt_conv_1.id_plt_entidade)
  • Rows Removed by Join Filter: 1823
93. 1.382 12.688 ↓ 13.2 304 8

Nested Loop (cost=27.24..333.37 rows=23 width=20) (actual time=0.241..1.586 rows=304 loops=8)

94. 1.624 5.696 ↓ 6.5 351 8

Hash Join (cost=26.96..296.77 rows=54 width=20) (actual time=0.223..0.712 rows=351 loops=8)

  • Hash Cond: (item_ped_nova.id_item_despesa_nova = du_1.id_item_despesa)
95. 2.736 3.616 ↑ 1.3 351 8

Bitmap Heap Scan on tb_item_pedido_nova item_ped_nova (cost=17.88..284.84 rows=460 width=12) (actual time=0.141..0.452 rows=351 loops=8)

  • Recheck Cond: (id_despesa_nova = item_desp.id_despesa)
  • Filter: (id_status_item_ped = 2)
  • Rows Removed by Filter: 202
96. 0.880 0.880 ↓ 1.3 969 8

Bitmap Index Scan on idx_tb_item_pedido_nova_id_despesa_nova (cost=0.00..17.77 rows=731 width=0) (actual time=0.110..0.110 rows=969 loops=8)

  • Index Cond: (id_despesa_nova = item_desp.id_despesa)
97. 0.152 0.456 ↓ 1.1 53 8

Hash (cost=8.48..8.48 rows=48 width=8) (actual time=0.057..0.057 rows=53 loops=8)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
98. 0.152 0.304 ↓ 1.1 53 8

Bitmap Heap Scan on tb_despesa_unidade du_1 (cost=4.76..8.48 rows=48 width=8) (actual time=0.027..0.038 rows=53 loops=8)

  • Recheck Cond: ((id_despesa = item_desp.id_despesa) AND (id_unidade_adm = 2))
99. 0.152 0.152 ↓ 1.1 53 8

Bitmap Index Scan on idx_tb_despesa_unidade_id_despesa_id_unidade_adm (cost=0.00..4.75 rows=48 width=0) (actual time=0.019..0.019 rows=53 loops=8)

  • Index Cond: ((id_despesa = item_desp.id_despesa) AND (id_unidade_adm = 2))
100. 5.610 5.610 ↑ 1.0 1 2,805

Index Scan using pk_tb_pedido_alteracao on tb_pedido_alteracao ped (cost=0.28..0.67 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=2,805)

  • Index Cond: (id_pedido_alteracao = item_ped_nova.id_pedido_alteracao)
  • Filter: (id_status_ped = 3)
  • Rows Removed by Filter: 0
101. 0.000 0.000 ↑ 1.0 6 2,436

Materialize (cost=0.28..8.47 rows=6 width=4) (actual time=0.000..0.000 rows=6 loops=2,436)

102. 0.014 0.014 ↑ 1.0 6 1

Index Scan using idx_tb_plt_convenio_id_convenio on tb_plt_convenio plt_conv_1 (cost=0.28..8.44 rows=6 width=4) (actual time=0.011..0.014 rows=6 loops=1)

  • Index Cond: (id_convenio = 2373)
103. 0.116 0.116 ↑ 1.0 1 29

Index Only Scan using pk_tb_plano_trabalho on tb_plt_entidade plt_1 (cost=0.28..0.46 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=29)

  • Index Cond: (id_plt_entidade = ped.id_plt_entidade)
  • Heap Fetches: 29
104. 0.087 0.087 ↑ 1.0 1 29

Seq Scan on tb_despesa d_1 (cost=0.00..1.14 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=29)

  • Filter: (id_despesa = item_desp.id_despesa)
  • Rows Removed by Filter: 8
105. 1.189 1.189 ↑ 1.0 1 29

Index Only Scan using idx_id_item_despesa1 on tb_item_despesa i_1 (cost=0.27..0.40 rows=1 width=4) (actual time=0.041..0.041 rows=1 loops=29)

  • Index Cond: (id_item_despesa = item_ped_nova.id_item_despesa_nova)
  • Heap Fetches: 29
106. 1.350 1.350 ↑ 1.0 1 225

Seq Scan on tb_status_pdc (cost=0.00..1.05 rows=1 width=2) (actual time=0.006..0.006 rows=1 loops=225)

  • Filter: (id_status_pdc = epdc.id_status_pdc)
  • Rows Removed by Filter: 3
107. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=9.62..9.63 rows=1 width=0) (never executed)

108. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=0.43..9.62 rows=1 width=0) (never executed)

  • Join Filter: (tb_status_item_pdc_7.id_status_item = tb_status_item.id_status_item)
109. 0.000 0.000 ↓ 0.0 0

Index Scan using fki_id_item_pdc on tb_status_item_pdc tb_status_item_pdc_7 (cost=0.43..8.48 rows=2 width=4) (never executed)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
110. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.08 rows=2 width=4) (never executed)

111. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_status_item (cost=0.00..1.07 rows=2 width=4) (never executed)

  • Filter: (flg_alt_item = 'S'::bpchar)