explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R0KO

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

Limit (cost=1,346.35..1,346.35 rows=1 width=320) (actual time=2,909.833..2,909.835 rows=10 loops=1)

2.          

Initplan (forLimit)

3. 0.014 0.014 ↑ 1.0 1 1

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

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

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

5.          

Initplan (forAggregate)

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

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

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

Sort (cost=1,328.08..1,328.08 rows=1 width=320) (actual time=2,909.819..2,909.827 rows=120 loops=1)

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

Nested Loop Left Join (cost=20.22..1,328.07 rows=1 width=320) (actual time=29.084..2,907.389 rows=225 loops=1)

10. 0.729 16.379 ↓ 225.0 225 1

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

11. 0.786 13.850 ↓ 225.0 225 1

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

12. 0.673 12.164 ↓ 225.0 225 1

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

13. 0.854 10.366 ↓ 225.0 225 1

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

14. 0.786 7.037 ↓ 225.0 225 1

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

15. 0.519 4.451 ↓ 225.0 225 1

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

16. 0.004 0.098 ↑ 1.0 1 1

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

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

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

  • Index Cond: (id_prestacao_contas = epdc.id_prestacao_contas)
19. 2.750 3.834 ↓ 225.0 225 1

Bitmap Heap Scan on tb_item_pdc ipdc (cost=18.25..22.27 rows=1 width=140) (actual time=1.126..3.834 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.012 1.045 ↓ 0.0 0 1

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

21. 0.191 0.191 ↓ 1.2 450 1

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

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

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

  • Index Cond: (id_edicao_pdc = 55452)
23.          

SubPlan (forBitmap Heap Scan)

24. 0.039 0.039 ↓ 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.039..0.039 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.475 2.475 ↑ 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.010..0.011 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.003..0.005 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.800 1.800 ↑ 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.008 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.925 2.925 ↑ 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.013 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.350 4.050 ↑ 1.0 1 225

Aggregate (cost=8.48..8.49 rows=1 width=4) (actual time=0.017..0.018 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.012..0.012 rows=1 loops=225)

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

Hash Join (cost=1.56..9.64 rows=2 width=9) (actual time=0.006..0.007 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.002..0.003 rows=1 loops=205)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
42. 0.005 0.009 ↑ 1.0 6 1

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

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

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

44. 0.450 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.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.815 1.230 ↑ 2.0 1 205

Hash Join (cost=1.56..9.64 rows=2 width=4) (actual time=0.006..0.006 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.002 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.003 0.003 ↑ 1.0 6 1

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

50. 0.900 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.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.003..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.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.575 1.575 ↑ 1.0 1 225

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

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

62.          

Initplan (forResult)

63. 1.800 5.625 ↑ 1.0 1 225

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

64. 0.450 3.825 ↓ 0.0 0 225

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

65. 1.125 3.375 ↓ 0.0 0 225

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

66. 1.125 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.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. 252.680 2,800.575 ↓ 70.0 70 225

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

  • Join Filter: (i.id_item_despesa = du.id_item_despesa)
  • Rows Removed by Join Filter: 11476
70. 8.775 8.775 ↓ 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.039 rows=66 loops=225)

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

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

72. 1.048 2,416.050 ↓ 12.8 153 225

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

73. 5.175 2,346.300 ↓ 12.8 153 225

Nested Loop (cost=263.99..1,576.95 rows=12 width=8) (actual time=9.036..10.428 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. 634.785 2,340.000 ↓ 12.8 153 225

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

  • Hash Cond: (desp_1.id_subitem_plt = sub.id_subitem_plt)
76. 1,222.425 1,704.825 ↓ 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.298..7.577 rows=27,692 loops=225)

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

  • Index Cond: (id_despesa = item_desp.id_despesa)
78. 0.015 0.390 ↓ 2.4 19 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
79. 0.008 0.375 ↓ 2.4 19 1

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

80. 0.013 0.291 ↓ 2.7 19 1

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

81. 0.009 0.188 ↓ 3.0 18 1

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

82. 0.010 0.113 ↑ 1.0 6 1

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

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

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

  • Index Cond: (id_plt_entidade = plt_conv.id_plt_entidade)
  • Heap Fetches: 6
85. 0.066 0.066 ↓ 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.008..0.011 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.090 0.090 ↑ 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.005..0.005 rows=1 loops=18)

  • Index Cond: (id_plt_edicao = plt_ed.id_plt_edicao)
87. 0.076 0.076 ↑ 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.004 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.001..0.002 rows=1 loops=34,351)

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

Nested Loop (cost=29.15..346.98 rows=1 width=4) (actual time=3.086..3.399 rows=4 loops=8)

90. 0.105 27.008 ↓ 4.0 4 8

Nested Loop (cost=28.88..346.58 rows=1 width=8) (actual time=3.075..3.376 rows=4 loops=8)

91. 0.074 26.816 ↓ 4.0 4 8

Nested Loop (cost=28.88..345.43 rows=1 width=16) (actual time=3.065..3.352 rows=4 loops=8)

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

Nested Loop (cost=28.60..344.96 rows=1 width=24) (actual time=3.048..3.321 rows=4 loops=8)

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

Nested Loop (cost=28.32..334.44 rows=23 width=20) (actual time=0.420..2.875 rows=304 loops=8)

94. 2.080 7.320 ↓ 6.5 351 8

Hash Join (cost=28.04..297.84 rows=54 width=20) (actual time=0.278..0.915 rows=351 loops=8)

  • Hash Cond: (item_ped_nova.id_item_despesa_nova = du_1.id_item_despesa)
95. 3.520 4.584 ↑ 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.168..0.573 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. 1.064 1.064 ↓ 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.133..0.133 rows=969 loops=8)

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

Hash (cost=9.55..9.55 rows=48 width=8) (actual time=0.082..0.082 rows=53 loops=8)

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

Seq Scan on tb_despesa_unidade du_1 (cost=0.00..9.55 rows=48 width=8) (actual time=0.009..0.064 rows=53 loops=8)

  • Filter: ((id_despesa = item_desp.id_despesa) AND (id_unidade_adm = 2))
  • Rows Removed by Filter: 384
99. 14.025 14.025 ↑ 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.005..0.005 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
100. 2.417 2.436 ↑ 1.0 6 2,436

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

101. 0.019 0.019 ↑ 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.015..0.019 rows=6 loops=1)

  • Index Cond: (id_convenio = 2373)
102. 0.174 0.174 ↑ 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.005..0.006 rows=1 loops=29)

  • Index Cond: (id_plt_entidade = ped.id_plt_entidade)
  • Heap Fetches: 29
103. 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
104. 0.116 0.116 ↑ 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.004..0.004 rows=1 loops=29)

  • Index Cond: (id_item_despesa = item_ped_nova.id_item_despesa_nova)
  • Heap Fetches: 29
105. 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
106. 0.000 0.000 ↓ 0.0 0

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

107. 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)
108. 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)
109. 0.000 0.000 ↓ 0.0 0

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

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