explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q5b2

Settings
# exclusive inclusive rows x rows loops node
1. 1.050 119,701.229 ↓ 40.6 1,015 1

Result (cost=5,246.43..10,706.09 rows=25 width=185) (actual time=119,262.487..119,701.229 rows=1,015 loops=1)

2. 0.154 119,700.179 ↓ 40.6 1,015 1

Append (cost=5,246.43..10,706.06 rows=25 width=185) (actual time=119,262.479..119,700.179 rows=1,015 loops=1)

3. 0.000 47.242 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=5,246.43..5,864.74 rows=1 width=205) (actual time=47.242..47.242 rows=0 loops=1)

4. 0.001 47.242 ↓ 0.0 0 1

Nested Loop Left Join (cost=5,246.43..5,864.74 rows=1 width=165) (actual time=47.242..47.242 rows=0 loops=1)

5. 0.000 47.241 ↓ 0.0 0 1

Nested Loop Left Join (cost=2,720.55..3,321.87 rows=1 width=117) (actual time=47.241..47.241 rows=0 loops=1)

6. 0.000 47.241 ↓ 0.0 0 1

Nested Loop (cost=2,720.50..3,313.74 rows=1 width=113) (actual time=47.241..47.241 rows=0 loops=1)

  • Join Filter: ((a.id_contract = d.id_contract) AND (a.id_instrument = d.id_instrument) AND (a.dt_reference = d.dt_reference))
7. 0.000 47.241 ↓ 0.0 0 1

Nested Loop (cost=2,720.46..3,313.69 rows=1 width=117) (actual time=47.241..47.241 rows=0 loops=1)

  • Join Filter: ((a.id_contract = b.id_contract) AND (a.id_certificate = b.id_certificate) AND (a.id_instrument = b.id_instrument) AND (a.id_customer = b.id_customer))
8. 0.001 47.241 ↓ 0.0 0 1

Nested Loop (cost=2,720.42..3,313.64 rows=1 width=109) (actual time=47.241..47.241 rows=0 loops=1)

9. 0.008 47.240 ↓ 0.0 0 1

Hash Right Join (cost=2,720.36..3,309.58 rows=1 width=81) (actual time=47.240..47.240 rows=0 loops=1)

  • Hash Cond: ((tb_dist_operation_withdraw.id_contract = a.id_contract) AND (tb_dist_operation_withdraw.id_customer = a.id_customer) AND (tb_dist_operation_withdraw.id_instrument = a.id_instrument) AND (tb_dist_operation_withdraw_certificate.id_certificate = a.id_certificate) AND (tb_dist_operation_withdraw.dt_levy = a.dt_reference))
10. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=1,457.55..1,636.10 rows=142,841 width=29) (never executed)

  • Group Key: tb_dist_operation_withdraw.id_contract, tb_dist_operation_withdraw.id_customer, tb_dist_operation_withdraw.id_instrument, tb_dist_operation_withdraw_certificate.id_certificate, tb_dist_operation_withdraw.dt_levy
11. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=587.72..1,243.28 rows=142,841 width=29) (never executed)

  • Hash Cond: ((tb_dist_operation_withdraw_certificate.id_contract = tb_dist_operation_withdraw.id_contract) AND (tb_dist_operation_withdraw_certificate.id_dist_operation_withdraw = tb_dist_operation_withdraw.id_dist_operation_withdraw))
12. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_operation_withdraw_certificate (cost=0.00..402.19 rows=147,386 width=21) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Hash (cost=441.94..441.94 rows=97,183 width=20) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_operation_withdraw (cost=0.00..441.94 rows=97,183 width=20) (never executed)

  • Filter: (id_status_order <> 6)
15. 0.001 47.232 ↓ 0.0 0 1

Hash (cost=1,262.81..1,262.81 rows=1 width=49) (actual time=47.232..47.232 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
16. 47.231 47.231 ↓ 0.0 0 1

Seq Scan on tb_dist_certificate_quote_erosion_executed a (cost=0.00..1,262.81 rows=1 width=49) (actual time=47.231..47.231 rows=0 loops=1)

  • Filter: ((dt_reference >= 20191001) AND (dt_reference <= 20191002) AND ((cd_cc_type)::text <> 'CC-IMPORT'::text))
  • Rows Removed by Filter: 234636
17. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_certificate_daily_pk on tb_dist_certificate_daily c (cost=0.06..4.06 rows=1 width=28) (never executed)

  • Index Cond: ((id_customer = a.id_customer) AND (id_instrument = a.id_instrument) AND (id_contract = a.id_contract) AND (id_certificate = a.id_certificate) AND (dt_reference = a.dt_reference))
18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using tb_dist_certificate_pk on tb_dist_certificate b (cost=0.04..0.05 rows=1 width=16) (never executed)

  • Index Cond: ((id_customer = c.id_customer) AND (id_instrument = c.id_instrument) AND (id_contract = c.id_contract) AND (id_certificate = c.id_certificate))
  • Heap Fetches: 0
19. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_fund_daily_pk on tb_dist_fund_daily d (cost=0.04..0.04 rows=1 width=20) (never executed)

  • Index Cond: ((id_contract = c.id_contract) AND (id_instrument = c.id_instrument) AND (dt_reference = c.dt_reference))
20. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_certificate_quote_erosion_executed_reg_cond_idx on tb_dist_certificate_quote_erosion_executed tb_tudo_de_come_cotas (cost=0.04..8.14 rows=1 width=32) (never executed)

  • Index Cond: ((a.id_contract = id_contract) AND (a.id_instrument = id_instrument) AND (a.id_certificate = id_certificate) AND (a.id_customer = id_customer))
  • Filter: ((a.dt_event > dt_event) AND ((dt_reference = (SubPlan 2)) OR ((SubPlan 4) IS NULL)))
21.          

SubPlan (forIndex Scan)

22. 0.000 0.000 ↓ 0.0 0

Result (cost=2.04..2.05 rows=1 width=0) (never executed)

23.          

Initplan (forResult)

24. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.04..2.04 rows=1 width=4) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Index Only Scan Backward using tb_dist_certificate_quote_erosion_executed_reg_cond_idx on tb_dist_certificate_quote_erosion_executed tb_exec (cost=0.04..2.04 rows=1 width=4) (never executed)

  • Index Cond: ((id_contract = a.id_contract) AND (id_instrument = a.id_instrument) AND (id_certificate = a.id_certificate) AND (id_customer = a.id_customer) AND (dt_reference IS NOT NULL) AND (dt_reference <= a.dt_reference))
  • Heap Fetches: 0
26. 0.000 0.000 ↓ 0.0 0

Result (cost=2.04..2.05 rows=1 width=0) (never executed)

27.          

Initplan (forResult)

28. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.04..2.04 rows=1 width=4) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Index Only Scan Backward using tb_dist_certificate_quote_erosion_executed_reg_cond_idx on tb_dist_certificate_quote_erosion_executed tb_exec_1 (cost=0.04..2.04 rows=1 width=4) (never executed)

  • Index Cond: ((id_contract = a.id_contract) AND (id_instrument = a.id_instrument) AND (id_certificate = a.id_certificate) AND (id_customer = a.id_customer) AND (dt_reference IS NOT NULL) AND (dt_reference <= a.dt_reference))
  • Heap Fetches: 0
30. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2,525.88..2,542.85 rows=1 width=80) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1,262.94..1,274.29 rows=1 width=56) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.08..9.16 rows=1 width=45) (never executed)

  • Join Filter: ((tb_dist_incorporation_certificate.id_instrument_orig = tb_dist_incorporation_request.id_instrument_orig) AND (tb_dist_incorporation_certificate.id_instrument_dest = tb_dist_incorporation_request.id_instrument_dest))
33. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.07..9.12 rows=1 width=40) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_incorporation_certificate_pk on tb_dist_incorporation_certificate (cost=0.03..5.79 rows=1 width=28) (never executed)

  • Index Cond: ((id_contract = a.id_contract) AND (id_customer = a.id_customer))
  • Filter: ((id_instrument_dest = a.id_instrument) AND (id_certificate_dest = a.id_certificate))
35. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_certificate_pk on tb_dist_certificate (cost=0.04..3.34 rows=1 width=20) (never executed)

  • Index Cond: ((id_customer = tb_dist_incorporation_certificate.id_customer) AND (id_instrument = tb_dist_incorporation_certificate.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate.id_certificate_orig))
36. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_incorporation_request_pk on tb_dist_incorporation_request (cost=0.01..0.03 rows=1 width=17) (never executed)

  • Index Cond: (id_instrument_orig = tb_dist_certificate.id_instrument)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_certificate_quote_erosion_executed_pk on tb_dist_certificate_quote_erosion_executed (cost=1,262.86..1,265.13 rows=1 width=24) (never executed)

  • Index Cond: ((dt_event = (SubPlan 5)) AND (id_customer = tb_dist_incorporation_certificate.id_customer) AND (id_instrument = tb_dist_incorporation_certificate.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate.id_certificate_orig))
38.          

SubPlan (forIndex Scan)

39. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1,262.81..1,262.81 rows=1 width=4) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_3 (cost=0.00..1,262.81 rows=1 width=4) (never executed)

  • Filter: ((id_customer = tb_dist_incorporation_certificate.id_customer) AND (id_instrument = tb_dist_incorporation_certificate.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate.id_certificate_orig))
41. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1,262.81..1,262.81 rows=1 width=4) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_3 (cost=0.00..1,262.81 rows=1 width=4) (never executed)

  • Filter: ((id_customer = tb_dist_incorporation_certificate.id_customer) AND (id_instrument = tb_dist_incorporation_certificate.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate.id_certificate_orig))
43. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1,262.94..1,268.57 rows=1 width=48) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.08..3.43 rows=1 width=45) (never executed)

  • Join Filter: ((tb_dist_incorporation_certificate_1.id_instrument_orig = tb_dist_incorporation_request_1.id_instrument_orig) AND (tb_dist_incorporation_certificate_1.id_instrument_dest = tb_dist_incorporation_request_1.id_instrument_dest))
45. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.07..3.40 rows=1 width=40) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_incorporation_certificate_pk on tb_dist_incorporation_certificate tb_dist_incorporation_certificate_1 (cost=0.03..0.06 rows=1 width=28) (never executed)

  • Index Cond: ((id_contract = tb_dist_incorporation_certificate.id_contract) AND (id_customer = tb_dist_incorporation_certificate.id_customer))
  • Filter: ((id_instrument_dest = tb_dist_incorporation_certificate.id_instrument_orig) AND (id_certificate_dest = tb_dist_incorporation_certificate.id_certificate_orig))
47. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_certificate_pk on tb_dist_certificate tb_dist_certificate_1 (cost=0.04..3.34 rows=1 width=20) (never executed)

  • Index Cond: ((id_customer = tb_dist_incorporation_certificate_1.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_1.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_1.id_certificate_orig))
48. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_incorporation_request_pk on tb_dist_incorporation_request tb_dist_incorporation_request_1 (cost=0.01..0.03 rows=1 width=17) (never executed)

  • Index Cond: (id_instrument_orig = tb_dist_certificate_1.id_instrument)
49. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_certificate_quote_erosion_executed_pk on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_1 (cost=1,262.86..1,265.13 rows=1 width=24) (never executed)

  • Index Cond: ((dt_event = (SubPlan 6)) AND (id_customer = tb_dist_incorporation_certificate_1.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_1.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_1.id_certificate_orig))
50.          

SubPlan (forIndex Scan)

51. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1,262.81..1,262.81 rows=1 width=4) (never executed)

52. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_4 (cost=0.00..1,262.81 rows=1 width=4) (never executed)

  • Filter: ((id_customer = tb_dist_incorporation_certificate_1.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_1.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_1.id_certificate_orig))
53. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1,262.81..1,262.81 rows=1 width=4) (never executed)

54. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_4 (cost=0.00..1,262.81 rows=1 width=4) (never executed)

  • Filter: ((id_customer = tb_dist_incorporation_certificate_1.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_1.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_1.id_certificate_orig))
55. 0.186 119,652.783 ↓ 42.3 1,015 1

Subquery Scan on *SELECT* 2 (cost=1,781.34..4,841.32 rows=24 width=184) (actual time=119,215.235..119,652.783 rows=1,015 loops=1)

56. 3.353 119,652.597 ↓ 42.3 1,015 1

Nested Loop Left Join (cost=1,781.34..4,841.29 rows=24 width=153) (actual time=119,215.233..119,652.597 rows=1,015 loops=1)

  • Join Filter: ((tb_dist_operation_withdraw_1.dt_levy >= tb_tudo_de_come_cotas_1.dt_reference) AND ((tb_tudo_de_come_cotas_1.dt_reference = (SubPlan 8)) OR ((SubPlan 10) IS NULL)))
  • Rows Removed by Join Filter: 421
57. 292.573 119,635.531 ↓ 42.3 1,015 1

Nested Loop Left Join (cost=1,781.29..4,738.75 rows=24 width=145) (actual time=119,215.184..119,635.531 rows=1,015 loops=1)

  • Join Filter: ((tb_dist_incorporation_certificate_2.id_contract = tb_dist_operation_withdraw_certificate_1.id_contract) AND (tb_dist_incorporation_certificate_2.id_customer = tb_dist_operation_withdraw_certificate_1.id_customer) AND (tb_dist_incorporation_certificate_2.id_instrument_dest = tb_dist_operation_withdraw_certificate_1.id_instrument) AND (tb_dist_incorporation_certificate_2.id_certificate_dest = tb_dist_operation_withdraw_certificate_1.id_certificate))
  • Rows Removed by Join Filter: 3765650
58. 1.005 77.413 ↓ 42.3 1,015 1

Nested Loop (cost=518.24..1,517.18 rows=24 width=73) (actual time=58.710..77.413 rows=1,015 loops=1)

  • Join Filter: (tb_dist_operation_withdraw_1.id_contract = tb_dist_certificate_2.id_contract)
59. 10.164 67.273 ↑ 1.0 1,015 1

Hash Join (cost=518.20..1,068.79 rows=1,024 width=69) (actual time=58.689..67.273 rows=1,015 loops=1)

  • Hash Cond: ((tb_dist_operation_withdraw_certificate_1.id_contract = tb_dist_operation_withdraw_1.id_contract) AND (tb_dist_operation_withdraw_certificate_1.id_dist_operation_withdraw = tb_dist_operation_withdraw_1.id_dist_operation_withdraw))
60. 32.046 32.046 ↓ 1.0 147,565 1

Seq Scan on tb_dist_operation_withdraw_certificate tb_dist_operation_withdraw_certificate_1 (cost=0.00..439.03 rows=147,378 width=48) (actual time=0.010..32.046 rows=147,565 loops=1)

  • Filter: (qtd_quotes <> '0'::numeric)
  • Rows Removed by Filter: 8
61. 0.135 25.063 ↓ 1.1 734 1

Hash (cost=517.15..517.15 rows=697 width=29) (actual time=25.063..25.063 rows=734 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
62. 24.928 24.928 ↓ 1.1 734 1

Seq Scan on tb_dist_operation_withdraw tb_dist_operation_withdraw_1 (cost=0.00..517.15 rows=697 width=29) (actual time=18.960..24.928 rows=734 loops=1)

  • Filter: ((dt_levy >= 20191001) AND (dt_levy <= 20191002) AND (id_status_order <> 6) AND ((cd_operation_type)::text <> 'RESG-IMPORT'::text))
  • Rows Removed by Filter: 99612
63. 9.135 9.135 ↑ 1.0 1 1,015

Index Scan using tb_dist_certificate_pk on tb_dist_certificate tb_dist_certificate_2 (cost=0.04..0.44 rows=1 width=24) (actual time=0.009..0.009 rows=1 loops=1,015)

  • Index Cond: ((id_customer = tb_dist_operation_withdraw_certificate_1.id_customer) AND (id_instrument = tb_dist_operation_withdraw_certificate_1.id_instrument) AND (id_contract = tb_dist_operation_withdraw_certificate_1.id_contract) AND (id_certificate = tb_dist_operation_withdraw_certificate_1.id_certificate))
64. 119.536 119,265.545 ↓ 1,855.0 3,710 1,015

Materialize (cost=1,263.06..3,221.46 rows=2 width=88) (actual time=0.043..117.503 rows=3,710 loops=1,015)

65. 118,999.916 119,146.009 ↓ 1,855.0 3,710 1

Nested Loop Left Join (cost=1,263.06..3,221.46 rows=2 width=88) (actual time=43.249..119,146.009 rows=3,710 loops=1)

66. 10.744 83.023 ↓ 1,855.0 3,710 1

Nested Loop (cost=0.20..691.19 rows=2 width=54) (actual time=0.046..83.023 rows=3,710 loops=1)

  • Join Filter: (tb_dist_incorporation_request_2.id_instrument_orig = tb_dist_certificate_3.id_instrument)
67. 10.991 12.919 ↓ 18.2 3,710 1

Hash Join (cost=0.16..10.15 rows=204 width=50) (actual time=0.035..12.919 rows=3,710 loops=1)

  • Hash Cond: ((tb_dist_incorporation_certificate_2.id_instrument_orig = tb_dist_incorporation_request_2.id_instrument_orig) AND (tb_dist_incorporation_certificate_2.id_instrument_dest = tb_dist_incorporation_request_2.id_instrument_dest))
68. 1.911 1.911 ↑ 1.0 3,710 1

Seq Scan on tb_dist_incorporation_certificate tb_dist_incorporation_certificate_2 (cost=0.00..7.01 rows=3,710 width=28) (actual time=0.003..1.911 rows=3,710 loops=1)

69. 0.005 0.017 ↑ 1.0 23 1

Hash (cost=0.12..0.12 rows=23 width=26) (actual time=0.017..0.017 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
70. 0.012 0.012 ↑ 1.0 23 1

Seq Scan on tb_dist_incorporation_request tb_dist_incorporation_request_2 (cost=0.00..0.12 rows=23 width=26) (actual time=0.004..0.012 rows=23 loops=1)

71. 59.360 59.360 ↑ 1.0 1 3,710

Index Scan using tb_dist_certificate_pk on tb_dist_certificate tb_dist_certificate_3 (cost=0.04..3.34 rows=1 width=20) (actual time=0.014..0.016 rows=1 loops=3,710)

  • Index Cond: ((id_customer = tb_dist_incorporation_certificate_2.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_2.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_2.id_certificate_orig))
72. 0.000 63.070 ↑ 1.0 1 3,710

Index Scan using tb_dist_certificate_quote_erosion_executed_pk on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_2 (cost=1,262.86..1,265.13 rows=1 width=24) (actual time=0.017..0.017 rows=1 loops=3,710)

  • Index Cond: ((dt_event = (SubPlan 11)) AND (id_customer = tb_dist_incorporation_certificate_2.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_2.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_2.id_certificate_orig))
73.          

SubPlan (forIndex Scan)

74. 18.550 118,961.150 ↑ 1.0 1 3,710

Aggregate (cost=1,262.81..1,262.81 rows=1 width=4) (actual time=32.065..32.065 rows=1 loops=3,710)

75. 118,942.600 118,942.600 ↓ 2.0 2 3,710

Seq Scan on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_5 (cost=0.00..1,262.81 rows=1 width=4) (actual time=12.224..32.060 rows=2 loops=3,710)

  • Filter: ((id_customer = tb_dist_incorporation_certificate_2.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_2.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_2.id_certificate_orig))
  • Rows Removed by Filter: 234634
76. 18.550 118,961.150 ↑ 1.0 1 3,710

Aggregate (cost=1,262.81..1,262.81 rows=1 width=4) (actual time=32.065..32.065 rows=1 loops=3,710)

77. 118,942.600 118,942.600 ↓ 2.0 2 3,710

Seq Scan on tb_dist_certificate_quote_erosion_executed tb_dist_certificate_quote_erosion_executed_5 (cost=0.00..1,262.81 rows=1 width=4) (actual time=12.224..32.060 rows=2 loops=3,710)

  • Filter: ((id_customer = tb_dist_incorporation_certificate_2.id_customer) AND (id_instrument = tb_dist_incorporation_certificate_2.id_instrument_orig) AND (id_certificate = tb_dist_incorporation_certificate_2.id_certificate_orig))
  • Rows Removed by Filter: 234634
78. 11.165 11.165 ↑ 1.0 1 1,015

Index Scan using tb_dist_certificate_quote_erosion_executed_reg_cond_idx on tb_dist_certificate_quote_erosion_executed tb_tudo_de_come_cotas_1 (cost=0.04..0.18 rows=1 width=28) (actual time=0.010..0.011 rows=1 loops=1,015)

  • Index Cond: ((tb_dist_operation_withdraw_certificate_1.id_contract = id_contract) AND (tb_dist_operation_withdraw_certificate_1.id_instrument = id_instrument) AND (tb_dist_operation_withdraw_certificate_1.id_certificate = id_certificate) AND (tb_dist_operation_withdraw_certificate_1.id_customer = id_customer))
79.          

SubPlan (forNested Loop Left Join)

80. 0.000 1.706 ↑ 1.0 1 853

Result (cost=2.04..2.05 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=853)

81.          

Initplan (forResult)

82. 0.000 1.706 ↑ 1.0 1 853

Limit (cost=0.04..2.04 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=853)

83. 1.706 1.706 ↑ 1.0 1 853

Index Only Scan Backward using tb_dist_certificate_quote_erosion_executed_reg_cond_idx on tb_dist_certificate_quote_erosion_executed tb_exec_2 (cost=0.04..2.04 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=853)

  • Index Cond: ((id_contract = tb_dist_operation_withdraw_certificate_1.id_contract) AND (id_instrument = tb_dist_operation_withdraw_certificate_1.id_instrument) AND (id_certificate = tb_dist_operation_withdraw_certificate_1.id_certificate) AND (id_customer = tb_dist_operation_withdraw_certificate_1.id_customer) AND (dt_reference IS NOT NULL) AND (dt_reference <= tb_dist_operation_withdraw_1.dt_levy))
  • Heap Fetches: 192
84. 0.000 0.842 ↑ 1.0 1 421

Result (cost=2.04..2.05 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=421)

85.          

Initplan (forResult)

86. 0.000 0.842 ↑ 1.0 1 421

Limit (cost=0.04..2.04 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=421)

87. 0.842 0.842 ↑ 1.0 1 421

Index Only Scan Backward using tb_dist_certificate_quote_erosion_executed_reg_cond_idx on tb_dist_certificate_quote_erosion_executed tb_exec_3 (cost=0.04..2.04 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=421)

  • Index Cond: ((id_contract = tb_dist_operation_withdraw_certificate_1.id_contract) AND (id_instrument = tb_dist_operation_withdraw_certificate_1.id_instrument) AND (id_certificate = tb_dist_operation_withdraw_certificate_1.id_certificate) AND (id_customer = tb_dist_operation_withdraw_certificate_1.id_customer) AND (dt_reference IS NOT NULL) AND (dt_reference <= tb_dist_operation_withdraw_1.dt_levy))
  • Heap Fetches: 86
Planning time : 55.629 ms
Execution time : 119,702.872 ms