explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bzP1

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,705.793 ↓ 10.0 10 1

Limit (cost=1,345.18..1,345.18 rows=1 width=320) (actual time=2,705.793..2,705.793 rows=10 loops=1)

2.          

Initplan (forLimit)

3. 0.007 0.007 ↑ 1.0 1 1

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

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

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

5.          

Initplan (forAggregate)

6. 0.005 0.005 ↓ 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.005..0.005 rows=0 loops=1)

  • Index Cond: (id_convenio_edicao = 55452)
7. 0.007 0.007 ↓ 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.007..0.007 rows=0 loops=1)

  • Index Cond: (id_convenio = $15)
  • Heap Fetches: 0
8. 1.998 2,705.789 ↓ 120.0 120 1

Sort (cost=1,326.91..1,326.91 rows=1 width=320) (actual time=2,705.784..2,705.789 rows=120 loops=1)

  • Sort Key: ipdc.dt_prestacao, forn.ds_razao_social, ipdc.vlr_despesa
  • Sort Method: quicksort Memory: 141kB
9. 17.868 2,703.791 ↓ 225.0 225 1

Nested Loop Left Join (cost=20.22..1,326.90 rows=1 width=320) (actual time=9.389..2,703.791 rows=225 loops=1)

10. 0.779 11.928 ↓ 225.0 225 1

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

11. 0.705 9.574 ↓ 225.0 225 1

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

12. 0.661 7.969 ↓ 225.0 225 1

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

13. 0.591 6.408 ↓ 225.0 225 1

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

14. 0.640 3.792 ↓ 225.0 225 1

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

15. 0.492 1.352 ↓ 225.0 225 1

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

16. 0.004 0.033 ↑ 1.0 1 1

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

17. 0.016 0.016 ↑ 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.014..0.016 rows=1 loops=1)

  • Index Cond: (id_edicao_pdc = 55452)
18. 0.013 0.013 ↑ 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.011..0.013 rows=1 loops=1)

  • Index Cond: (id_prestacao_contas = epdc.id_prestacao_contas)
19. 0.738 0.827 ↓ 225.0 225 1

Bitmap Heap Scan on tb_item_pdc ipdc (cost=18.25..22.27 rows=1 width=140) (actual time=0.103..0.827 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.007 0.083 ↓ 0.0 0 1

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

21. 0.048 0.048 ↓ 1.2 450 1

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

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

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

  • Index Cond: (id_edicao_pdc = 55452)
23.          

SubPlan (forBitmap Heap Scan)

24. 0.006 0.006 ↓ 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.006..0.006 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.025 2.025 ↑ 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.007..0.009 rows=1 loops=225)

  • Index Cond: (ipdc.id_fornecedor = id_fornecedor)
27. 0.900 0.900 ↑ 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.003..0.004 rows=1 loops=225)

  • Index Cond: (ipdc.id_item_despesa = id_item_despesa)
28. 0.900 0.900 ↑ 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.003..0.004 rows=1 loops=225)

  • Index Cond: (id_despesa = item_desp.id_despesa)
29. 1.575 1.575 ↑ 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.005..0.007 rows=1 loops=225)

  • Index Cond: (id_usuario = ipdc.id_usu_analise)
30. 1.350 1.350 ↑ 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.006 rows=1 loops=225)

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

SubPlan (forNested Loop Left Join)

32. 2.250 2.250 ↑ 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.010..0.010 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.002..0.003 rows=1 loops=225)

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

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

39. 2.025 2.025 ↑ 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.009..0.009 rows=1 loops=225)

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

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

  • Hash Cond: (stp.id_status_item = st.id_status_item)
41. 0.410 0.410 ↑ 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.002..0.002 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.006..0.008 rows=6 loops=1)

44. 0.675 1.125 ↑ 1.0 1 225

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

45. 0.450 0.450 ↑ 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.002..0.002 rows=1 loops=225)

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

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

  • Hash Cond: (stp_1.id_status_item = st_1.id_status_item)
47. 0.410 0.410 ↑ 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.002 rows=1 loops=205)

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

Hash (cost=1.06..1.06 rows=6 width=4) (actual time=0.003..0.003 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.000..0.002 rows=6 loops=1)

50. 0.675 1.350 ↑ 1.0 1 225

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

51. 0.675 0.675 ↑ 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.002..0.003 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.450 1.125 ↑ 1.0 1 225

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

53. 0.675 0.675 ↓ 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.003..0.003 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.225 0.900 ↑ 1.0 1 225

Aggregate (cost=8.49..8.50 rows=1 width=6) (actual time=0.004..0.004 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.225 0.900 ↑ 1.0 1 225

Aggregate (cost=8.49..8.50 rows=1 width=6) (actual time=0.004..0.004 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.350 1.350 ↑ 1.0 1 225

Seq Scan on tb_tipo_doc_unidade (cost=0.00..1.21 rows=1 width=2) (actual time=0.005..0.006 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.675 1.350 ↑ 1.0 1 225

Aggregate (cost=8.48..8.49 rows=1 width=6) (actual time=0.006..0.006 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.002..0.003 rows=1 loops=225)

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

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

62.          

Initplan (forResult)

63. 1.800 5.175 ↑ 1.0 1 225

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

64. 0.225 3.375 ↓ 0.0 0 225

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

65. 0.900 3.150 ↓ 0.0 0 225

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

66. 1.350 2.025 ↑ 1.0 1 225

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

67. 0.675 0.675 ↑ 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.003 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. 237.340 2,635.200 ↓ 70.0 70 225

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

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

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

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

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

72. 31.349 2,261.025 ↓ 12.8 153 225

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

73. 4.950 2,195.325 ↓ 12.8 153 225

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

74. 1.125 1.125 ↑ 1.0 1 225

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

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

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

  • Hash Cond: (desp_1.id_subitem_plt = sub.id_subitem_plt)
76. 1,171.350 1,607.850 ↓ 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.085..7.146 rows=27,692 loops=225)

  • Recheck Cond: (id_despesa = item_desp.id_despesa)
77. 436.500 436.500 ↓ 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=1.940..1.940 rows=27,693 loops=225)

  • Index Cond: (id_despesa = item_desp.id_despesa)
78. 0.010 0.231 ↓ 2.4 19 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
79. 0.015 0.221 ↓ 2.4 19 1

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

80. 0.011 0.149 ↓ 2.7 19 1

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

81. 0.006 0.084 ↓ 3.0 18 1

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

82. 0.007 0.036 ↑ 1.0 6 1

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

83. 0.011 0.011 ↑ 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.009..0.011 rows=6 loops=1)

  • Index Cond: (id_convenio = 2373)
84. 0.018 0.018 ↑ 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.003..0.003 rows=1 loops=6)

  • Index Cond: (id_plt_entidade = plt_conv.id_plt_entidade)
  • Heap Fetches: 6
85. 0.042 0.042 ↓ 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.004..0.007 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.054 0.054 ↑ 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.003 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. 34.351 34.351 ↑ 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.001..0.001 rows=1 loops=34,351)

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

Nested Loop (cost=27.98..345.82 rows=1 width=4) (actual time=1.608..1.755 rows=4 loops=8)

90. 0.086 13.936 ↓ 4.0 4 8

Nested Loop (cost=27.71..345.41 rows=1 width=8) (actual time=1.601..1.742 rows=4 loops=8)

91. 0.044 13.792 ↓ 4.0 4 8

Nested Loop (cost=27.71..344.26 rows=1 width=16) (actual time=1.592..1.724 rows=4 loops=8)

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

Nested Loop (cost=27.43..343.79 rows=1 width=24) (actual time=1.579..1.704 rows=4 loops=8)

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

Nested Loop (cost=27.15..333.27 rows=23 width=20) (actual time=0.211..1.386 rows=304 loops=8)

94. 1.400 5.184 ↓ 6.5 351 8

Hash Join (cost=26.87..296.67 rows=54 width=20) (actual time=0.196..0.648 rows=351 loops=8)

  • Hash Cond: (item_ped_nova.id_item_despesa_nova = du_1.id_item_despesa)
95. 2.616 3.376 ↑ 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.122..0.422 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.760 0.760 ↓ 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.095..0.095 rows=969 loops=8)

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

Hash (cost=8.39..8.39 rows=48 width=8) (actual time=0.051..0.051 rows=53 loops=8)

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

Bitmap Heap Scan on tb_despesa_unidade du_1 (cost=4.65..8.39 rows=48 width=8) (actual time=0.022..0.034 rows=53 loops=8)

  • Recheck Cond: (id_despesa = item_desp.id_despesa)
  • Filter: (id_unidade_adm = 2)
  • Rows Removed by Filter: 0
99. 0.112 0.112 ↓ 1.1 54 8

Bitmap Index Scan on idx_tb_despesa_unidade_id_despesa (cost=0.00..4.64 rows=49 width=0) (actual time=0.014..0.014 rows=54 loops=8)

  • Index Cond: (id_despesa = item_desp.id_despesa)
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.016 0.016 ↑ 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.013..0.016 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.003..0.004 rows=1 loops=29)

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

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

  • Filter: (id_despesa = item_desp.id_despesa)
  • Rows Removed by Filter: 8
105. 0.058 0.058 ↑ 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.002..0.002 rows=1 loops=29)

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

Seq Scan on tb_status_pdc (cost=0.00..1.05 rows=1 width=2) (actual time=0.005..0.005 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)