explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DTMn

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.494 ↑ 1.0 10 1

Limit (cost=3.80..202.70 rows=10 width=205) (actual time=0.124..0.494 rows=10 loops=1)

2. 0.020 0.486 ↑ 6.2 10 1

Nested Loop Left Join (cost=3.80..1,236.97 rows=62 width=205) (actual time=0.122..0.486 rows=10 loops=1)

  • Join Filter: ((tb_bond_operation.id_contract = tb_bond_issuer.id_contract) AND (tb_bond_operation.id_issuer = tb_bond_issuer.id_issuer))
  • Rows Removed by Join Filter: 47
3. 0.013 0.446 ↑ 6.2 10 1

Nested Loop Left Join (cost=3.80..1,234.54 rows=62 width=190) (actual time=0.106..0.446 rows=10 loops=1)

4. 0.011 0.363 ↑ 6.2 10 1

Nested Loop Left Join (cost=3.38..775.58 rows=62 width=166) (actual time=0.087..0.363 rows=10 loops=1)

5. 0.139 0.312 ↑ 6.2 10 1

Nested Loop Left Join (cost=3.24..758.69 rows=62 width=152) (actual time=0.074..0.312 rows=10 loops=1)

6. 0.027 0.163 ↑ 6.2 10 1

Nested Loop Left Join (cost=2.19..445.94 rows=62 width=137) (actual time=0.063..0.163 rows=10 loops=1)

7. 0.011 0.116 ↑ 6.2 10 1

Nested Loop (cost=0.29..78.42 rows=62 width=133) (actual time=0.056..0.116 rows=10 loops=1)

8. 0.007 0.075 ↑ 6.2 10 1

Nested Loop (cost=0.14..65.43 rows=62 width=91) (actual time=0.044..0.075 rows=10 loops=1)

  • Join Filter: ((tb_bond_operation.side)::text = (dm_side_operation.cd_side_operation)::text)
  • Rows Removed by Join Filter: 5
9. 0.048 0.048 ↑ 25.0 10 1

Index Scan Backward using tb_bond_operation_pk on tb_bond_operation (cost=0.14..60.63 rows=250 width=59) (actual time=0.029..0.048 rows=10 loops=1)

  • Index Cond: (id_contract = 39)
10. 0.010 0.020 ↓ 2.0 2 10

Materialize (cost=0.00..1.05 rows=1 width=68) (actual time=0.001..0.002 rows=2 loops=10)

11. 0.010 0.010 ↓ 4.0 4 1

Seq Scan on dm_side_operation (cost=0.00..1.05 rows=1 width=68) (actual time=0.008..0.010 rows=4 loops=1)

  • Filter: (id_contract = 39)
12. 0.030 0.030 ↑ 1.0 1 10

Index Scan using tb_bond_operation_status_pk on tb_bond_operation_status (cost=0.14..0.21 rows=1 width=50) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: ((id_contract = 39) AND (id_status = tb_bond_operation.id_status))
13. 0.010 0.020 ↓ 0.0 0 10

Bitmap Heap Scan on tb_bond_custody_external_instrument custody_external_instrument (cost=1.90..5.92 rows=1 width=20) (actual time=0.002..0.002 rows=0 loops=10)

  • Recheck Cond: ((tb_bond_operation.id_contract = id_contract) AND (id_contract = 39) AND (tb_bond_operation.id_instrument = id_instrument))
  • Heap Blocks: exact=1
14. 0.010 0.010 ↓ 0.0 0 10

Bitmap Index Scan on tb_bond_custody_external_instrument_id_contract_id_instrument_i (cost=0.00..1.90 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=10)

  • Index Cond: ((tb_bond_operation.id_contract = id_contract) AND (id_contract = 39) AND (tb_bond_operation.id_instrument = id_instrument))
15. 0.000 0.010 ↓ 0.0 0 10

Index Scan using tb_bond_custody_external_dt_reference_id_operation_external_2_i on tb_bond_custody_external custody_external (cost=1.05..5.03 rows=1 width=43) (actual time=0.001..0.001 rows=0 loops=10)

  • Index Cond: ((id_contract = custody_external_instrument.id_contract) AND (id_contract = 39) AND (id_operation_external = custody_external_instrument.id_operation_external) AND (dt_reference = (SubPlan 2)))
16.          

SubPlan (for Index Scan)

17. 0.010 0.120 ↑ 1.0 1 10

Result (cost=0.62..0.63 rows=1 width=4) (actual time=0.011..0.012 rows=1 loops=10)

18.          

Initplan (for Result)

19. 0.010 0.110 ↓ 0.0 0 10

Limit (cost=0.42..0.62 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=10)

20. 0.100 0.100 ↓ 0.0 0 10

Index Only Scan Backward using tb_bond_custody_external_dt_reference_id_operation_external_2_i on tb_bond_custody_external custody_external_dt_reference (cost=0.42..4.94 rows=23 width=4) (actual time=0.010..0.010 rows=0 loops=10)

  • Index Cond: ((id_contract = custody_external_instrument.id_contract) AND (id_operation_external = custody_external_instrument.id_operation_external) AND (dt_reference IS NOT NULL))
  • Heap Fetches: 0
21. 0.040 0.040 ↑ 1.0 1 10

Index Scan using tb_bond_title_pk on tb_bond_title (cost=0.14..0.27 rows=1 width=22) (actual time=0.004..0.004 rows=1 loops=10)

  • Index Cond: ((tb_bond_operation.id_contract = id_contract) AND (id_contract = 39) AND (tb_bond_operation.id_bond = id_bond))
22. 0.070 0.070 ↑ 1.0 1 10

Index Scan using tb_core_customer_data_pk on tb_core_customer_data (cost=0.42..7.40 rows=1 width=36) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: ((tb_bond_operation.id_contract = id_contract) AND (id_contract = 39) AND (tb_bond_operation.id_customer = id_customer))
23. 0.011 0.020 ↓ 6.0 6 10

Materialize (cost=0.00..1.04 rows=1 width=40) (actual time=0.001..0.002 rows=6 loops=10)

24. 0.009 0.009 ↓ 7.0 7 1

Seq Scan on tb_bond_issuer (cost=0.00..1.04 rows=1 width=40) (actual time=0.006..0.009 rows=7 loops=1)

  • Filter: (id_contract = 39)
Planning time : 10.428 ms
Execution time : 0.718 ms