explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Q8u

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 66.825 ↓ 10.0 10 1

Limit (cost=461.28..461.28 rows=1 width=320) (actual time=66.823..66.825 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.006 ↑ 1.0 1 1

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

5.          

Initplan (forAggregate)

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

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

  • Index Cond: (id_convenio = $15)
  • Heap Fetches: 0
8. 1.057 66.819 ↓ 120.0 120 1

Sort (cost=443.01..443.01 rows=1 width=320) (actual time=66.815..66.819 rows=120 loops=1)

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

Nested Loop Anti Join (cost=12.21..443.00 rows=1 width=320) (actual time=0.424..65.762 rows=225 loops=1)

  • Join Filter: (ipdc.id_item_pdc = tb_status_item_pdc.id_item_pdc)
10. 0.193 4.828 ↓ 225.0 225 1

Nested Loop Left Join (cost=11.78..39.50 rows=1 width=320) (actual time=0.135..4.828 rows=225 loops=1)

11. 0.124 4.185 ↓ 225.0 225 1

Nested Loop Left Join (cost=11.65..39.25 rows=1 width=303) (actual time=0.133..4.185 rows=225 loops=1)

12. 0.088 3.386 ↓ 225.0 225 1

Nested Loop Left Join (cost=11.37..38.38 rows=1 width=281) (actual time=0.128..3.386 rows=225 loops=1)

13. 0.160 2.848 ↓ 225.0 225 1

Nested Loop Left Join (cost=11.24..38.19 rows=1 width=251) (actual time=0.124..2.848 rows=225 loops=1)

14. 0.278 2.238 ↓ 225.0 225 1

Nested Loop Left Join (cost=10.97..37.53 rows=1 width=221) (actual time=0.120..2.238 rows=225 loops=1)

15. 0.340 1.285 ↓ 225.0 225 1

Nested Loop Left Join (cost=10.68..32.89 rows=1 width=164) (actual time=0.114..1.285 rows=225 loops=1)

16. 0.165 0.495 ↓ 225.0 225 1

Nested Loop (cost=10.40..30.47 rows=1 width=156) (actual time=0.109..0.495 rows=225 loops=1)

17. 0.003 0.024 ↑ 1.0 1 1

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

18. 0.014 0.014 ↑ 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.012..0.014 rows=1 loops=1)

  • Index Cond: (id_edicao_pdc = 55452)
19. 0.007 0.007 ↑ 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.006..0.007 rows=1 loops=1)

  • Index Cond: (id_prestacao_contas = epdc.id_prestacao_contas)
20. 0.232 0.306 ↓ 225.0 225 1

Bitmap Heap Scan on tb_item_pdc ipdc (cost=9.82..13.83 rows=1 width=140) (actual time=0.084..0.306 rows=225 loops=1)

  • Recheck Cond: ((id_prestacao_contas = pdc.id_prestacao_contas) AND (id_edicao_pdc = 55452))
21. 0.007 0.074 ↓ 0.0 0 1

BitmapAnd (cost=9.82..9.82 rows=1 width=0) (actual time=0.074..0.074 rows=0 loops=1)

22. 0.042 0.042 ↓ 1.2 450 1

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

  • Index Cond: (id_prestacao_contas = pdc.id_prestacao_contas)
23. 0.025 0.025 ↓ 1.7 225 1

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

  • Index Cond: (id_edicao_pdc = 55452)
24. 0.450 0.450 ↓ 0.0 0 225

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

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

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

  • Index Cond: (ipdc.id_fornecedor = id_fornecedor)
26. 0.450 0.450 ↑ 1.0 1 225

Index Scan using idx_id_item_despesa1 on tb_item_despesa item_desp (cost=0.27..0.65 rows=1 width=30) (actual time=0.001..0.002 rows=1 loops=225)

  • Index Cond: (ipdc.id_item_despesa = id_item_despesa)
27. 0.450 0.450 ↑ 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.001..0.002 rows=1 loops=225)

  • Index Cond: (id_despesa = item_desp.id_despesa)
28. 0.675 0.675 ↑ 1.0 1 225

Index Scan using pk_tb_usuario on tb_usuario usu (cost=0.28..0.86 rows=1 width=30) (actual time=0.002..0.003 rows=1 loops=225)

  • Index Cond: (id_usuario = ipdc.id_usu_analise)
29. 0.450 0.450 ↑ 1.0 1 225

Index Scan using pk_tb_tipo_doc on tb_tipo_doc doc (cost=0.14..0.24 rows=1 width=21) (actual time=0.001..0.002 rows=1 loops=225)

  • Index Cond: (id_tipo_doc = ipdc.id_tipo_doc)
30. 0.000 0.000 ↓ 0.0 0 225

Materialize (cost=0.43..8.45 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=225)

31. 0.006 0.006 ↓ 0.0 0 1

Index Scan using idx_tb_status_item_pdc_id_status_item on tb_status_item_pdc (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)
32.          

SubPlan (forNested Loop Anti Join)

33. 0.900 0.900 ↑ 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.004..0.004 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
34. 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)
35.          

Initplan (forIndex Scan)

36. 0.000 0.000 ↓ 0.0 0

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

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

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
39. 0.225 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)

40. 0.900 0.900 ↑ 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.004 rows=1 loops=225)

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Heap Fetches: 249
41. 0.199 0.615 ↑ 2.0 1 205

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

  • Hash Cond: (stp.id_status_item = st.id_status_item)
42. 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)
43. 0.003 0.006 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
44. 0.003 0.003 ↑ 1.0 6 1

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

45. 0.225 0.675 ↑ 1.0 1 225

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

46. 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_2 (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
47. 0.203 0.615 ↑ 2.0 1 205

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

  • Hash Cond: (stp_1.id_status_item = st_1.id_status_item)
48. 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)
49. 0.001 0.002 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
50. 0.001 0.001 ↑ 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.001 rows=6 loops=1)

51. 0.225 0.675 ↑ 1.0 1 225

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

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

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
  • Filter: (id_status_item = 1)
  • Rows Removed by Filter: 0
53. 0.000 0.450 ↑ 1.0 1 225

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

54. 0.450 0.450 ↓ 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.002..0.002 rows=0 loops=225)

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

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

56. 0.450 0.450 ↓ 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.002..0.002 rows=0 loops=225)

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

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

58. 0.450 0.450 ↓ 0.0 0 225

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

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

Seq Scan on tb_tipo_doc_unidade (cost=0.00..1.21 rows=1 width=2) (actual time=0.002..0.003 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
60. 0.225 0.675 ↑ 1.0 1 225

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

61. 0.450 0.450 ↑ 2.0 1 225

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=6) (actual time=0.002..0.002 rows=1 loops=225)

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

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

63.          

Initplan (forResult)

64. 0.450 2.025 ↑ 1.0 1 225

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

65. 0.225 1.575 ↓ 0.0 0 225

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

66. 0.450 1.350 ↓ 0.0 0 225

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

67. 0.450 0.900 ↑ 1.0 1 225

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

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

  • Index Cond: (id_item_pdc = ipdc.id_item_pdc)
69. 0.000 0.000 ↓ 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.000..0.000 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)
70. 2.025 33.525 ↓ 12.0 12 225

Hash Join (cost=11.08..90.88 rows=1 width=4) (actual time=0.101..0.149 rows=12 loops=225)

  • Hash Cond: (i.id_item_despesa = du.id_item_despesa)
71. 2.333 16.425 ↑ 1.0 12 225

Nested Loop (cost=2.10..81.82 rows=12 width=12) (actual time=0.029..0.073 rows=12 loops=225)

72. 0.675 11.475 ↑ 1.0 12 225

Nested Loop (cost=1.82..78.14 rows=12 width=8) (actual time=0.026..0.051 rows=12 loops=225)

73. 0.450 0.450 ↑ 1.0 1 225

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

  • Filter: (id_despesa = item_desp.id_despesa)
  • Rows Removed by Filter: 5
74. 0.597 10.350 ↑ 1.0 12 225

Nested Loop (cost=1.82..76.88 rows=12 width=8) (actual time=0.022..0.046 rows=12 loops=225)

75. 0.349 6.075 ↑ 2.7 3 225

Nested Loop (cost=1.41..62.59 rows=8 width=4) (actual time=0.016..0.027 rows=3 loops=225)

76. 0.144 4.500 ↑ 2.3 3 225

Nested Loop (cost=1.12..59.89 rows=7 width=4) (actual time=0.013..0.020 rows=3 loops=225)

77. 0.227 3.150 ↑ 2.0 3 225

Nested Loop (cost=0.84..56.97 rows=6 width=4) (actual time=0.010..0.014 rows=3 loops=225)

78. 0.226 1.575 ↑ 6.0 1 225

Nested Loop (cost=0.56..54.30 rows=6 width=8) (actual time=0.006..0.007 rows=1 loops=225)

79. 0.675 0.675 ↑ 6.0 1 225

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

  • Index Cond: (id_convenio = 2373)
80. 0.674 0.674 ↑ 1.0 1 337

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.002..0.002 rows=1 loops=337)

  • Index Cond: (id_plt_entidade = plt_conv.id_plt_entidade)
  • Heap Fetches: 337
81. 1.348 1.348 ↓ 2.0 2 337

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.003..0.004 rows=2 loops=337)

  • Index Cond: (id_plt_entidade = plt.id_plt_entidade)
  • Filter: (id_status_plt = 5)
  • Rows Removed by Filter: 2
82. 1.206 1.206 ↑ 1.0 1 603

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.002..0.002 rows=1 loops=603)

  • Index Cond: (id_plt_edicao = plt_ed.id_plt_edicao)
83. 1.226 1.226 ↑ 1.0 1 613

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.002..0.002 rows=1 loops=613)

  • Index Cond: (id_item_plt = item.id_item_plt)
84. 3.678 3.678 ↓ 2.0 4 613

Index Scan using idx_tb_desp_subitem_id_subitem_plt on tb_desp_subitem desp_1 (cost=0.42..1.77 rows=2 width=12) (actual time=0.004..0.006 rows=4 loops=613)

  • Index Cond: (id_subitem_plt = sub.id_subitem_plt)
  • Filter: (id_despesa = item_desp.id_despesa)
  • Rows Removed by Filter: 13
85. 2.617 2.617 ↑ 1.0 1 2,617

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=2,617)

  • Index Cond: (id_item_despesa = desp_1.id_item_despesa)
  • Heap Fetches: 2617
86. 5.175 15.075 ↓ 3.2 156 225

Hash (cost=8.39..8.39 rows=48 width=8) (actual time=0.067..0.067 rows=156 loops=225)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
87. 7.200 9.900 ↓ 3.2 156 225

Bitmap Heap Scan on tb_despesa_unidade du (cost=4.65..8.39 rows=48 width=8) (actual time=0.017..0.044 rows=156 loops=225)

  • Recheck Cond: (id_despesa = item_desp.id_despesa)
  • Filter: (id_unidade_adm = 2)
  • Rows Removed by Filter: 4
88. 2.700 2.700 ↓ 3.3 160 225

Bitmap Index Scan on idx_tb_despesa_unidade_id_despesa (cost=0.00..4.64 rows=49 width=0) (actual time=0.012..0.012 rows=160 loops=225)

  • Index Cond: (id_despesa = item_desp.id_despesa)
89. 0.022 11.016 ↓ 4.0 4 8

Nested Loop (cost=27.99..347.58 rows=1 width=4) (actual time=1.259..1.377 rows=4 loops=8)

90. 0.038 10.936 ↓ 4.0 4 8

Nested Loop (cost=27.71..347.17 rows=1 width=8) (actual time=1.254..1.367 rows=4 loops=8)

91. 0.030 10.840 ↓ 4.0 4 8

Nested Loop (cost=27.71..346.02 rows=1 width=16) (actual time=1.249..1.355 rows=4 loops=8)

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

Nested Loop (cost=27.43..345.55 rows=1 width=24) (actual time=1.243..1.344 rows=4 loops=8)

  • Join Filter: (ped.id_plt_entidade = plt_conv_1.id_plt_entidade)
  • Rows Removed by Join Filter: 1823
93. 1.987 8.496 ↓ 12.7 304 8

Nested Loop (cost=27.15..334.94 rows=24 width=20) (actual time=0.148..1.062 rows=304 loops=8)

94. 1.056 3.704 ↓ 6.4 351 8

Hash Join (cost=26.87..297.71 rows=55 width=20) (actual time=0.140..0.463 rows=351 loops=8)

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

Bitmap Heap Scan on tb_item_pedido_nova item_ped_nova (cost=17.89..285.87 rows=461 width=12) (actual time=0.103..0.301 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.632 0.632 ↓ 1.3 969 8

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
98. 0.112 0.168 ↓ 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.010..0.021 rows=53 loops=8)

  • Recheck Cond: (id_despesa = item_desp.id_despesa)
  • Filter: (id_unidade_adm = 2)
  • Rows Removed by Filter: 0
99. 0.056 0.056 ↓ 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.007..0.007 rows=54 loops=8)

  • Index Cond: (id_despesa = item_desp.id_despesa)
100. 2.805 2.805 ↑ 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.001..0.001 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.003 0.003 ↑ 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.002..0.003 rows=6 loops=1)

  • Index Cond: (id_convenio = 2373)
103. 0.058 0.058 ↑ 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.002..0.002 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. 0.450 0.450 ↑ 1.0 1 225

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