explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ptkN

Settings
# exclusive inclusive rows x rows loops node
1. 0.138 25.959 ↑ 1.0 1,000 1

Limit (cost=28.24..25,862.47 rows=1,000 width=231) (actual time=0.160..25.959 rows=1,000 loops=1)

2. 4.115 25.821 ↑ 19.4 1,001 1

Nested Loop (cost=2.41..502,142.24 rows=19,437 width=231) (actual time=0.126..25.821 rows=1,001 loops=1)

3. 0.481 12.697 ↑ 15.0 1,001 1

Nested Loop Left Join (cost=1.98..394,721.70 rows=15,015 width=191) (actual time=0.072..12.697 rows=1,001 loops=1)

  • Join Filter: ((tb_dist_certificate_daily.id_contract = tb_dist_certificate_quote_erosion_executed.id_contract) AND (tb_dist_certificate_daily.dt_reference = tb_dist_certificate_quote_erosion_executed.dt_reference) AND (tb_dist_certificate_daily.id_customer = tb_dist_certificate_quote_erosion_executed.id_customer) AND (tb_dist_certificate_daily.id_instrument = tb_dist_certificate_quote_erosion_executed.id_instrument) AND (tb_dist_certificate_daily.id_certificate = tb_dist_certificate_quote_erosion_executed.id_certificate))
4. 0.468 12.216 ↑ 15.0 1,001 1

Nested Loop Left Join (cost=1.56..394,343.88 rows=15,015 width=193) (actual time=0.062..12.216 rows=1,001 loops=1)

5. 0.477 8.745 ↑ 15.0 1,001 1

Nested Loop Left Join (cost=1.27..381,854.80 rows=15,015 width=157) (actual time=0.055..8.745 rows=1,001 loops=1)

6. 0.812 6.266 ↑ 15.0 1,001 1

Nested Loop (cost=0.99..370,702.16 rows=15,015 width=120) (actual time=0.045..6.266 rows=1,001 loops=1)

7. 1.450 1.450 ↑ 252.9 1,001 1

Index Scan using tb_dist_certificate_daily_id_contract_dt_reference_idx on tb_dist_certificate_daily (cost=0.57..114,964.79 rows=253,108 width=82) (actual time=0.028..1.450 rows=1,001 loops=1)

  • Index Cond: ((id_contract = 8) AND (dt_reference = 20,200,601))
8. 4.004 4.004 ↑ 1.0 1 1,001

Index Scan using tb_dist_certificate_pk on tb_dist_certificate (cost=0.43..1.01 rows=1 width=46) (actual time=0.004..0.004 rows=1 loops=1,001)

  • Index Cond: ((id_customer = tb_dist_certificate_daily.id_customer) AND (id_instrument = tb_dist_certificate_daily.id_instrument) AND (id_contract = 8) AND (id_certificate = tb_dist_certificate_daily.id_certificate))
  • Filter: (NOT is_from_minicom)
9. 2.002 2.002 ↑ 1.0 1 1,001

Index Scan using tb_dist_fund_selected_pk on tb_dist_fund_selected (cost=0.28..0.74 rows=1 width=45) (actual time=0.002..0.002 rows=1 loops=1,001)

  • Index Cond: ((tb_dist_certificate.id_contract = id_contract) AND (id_contract = 8) AND (tb_dist_certificate.id_instrument = id_instrument))
10. 3.003 3.003 ↑ 1.0 1 1,001

Index Scan using tb_core_customer_data_pk on tb_core_customer_data (cost=0.29..0.83 rows=1 width=44) (actual time=0.003..0.003 rows=1 loops=1,001)

  • Index Cond: ((tb_dist_certificate.id_contract = id_contract) AND (id_contract = 8) AND (tb_dist_certificate.id_customer = id_customer))
11. 0.000 0.000 ↓ 0.0 0 1,001

Materialize (cost=0.42..2.45 rows=1 width=26) (actual time=0.000..0.000 rows=0 loops=1,001)

12. 0.007 0.007 ↓ 0.0 0 1

Index Scan using tb_dist_certificate_quote_erosion_executed_idx1 on tb_dist_certificate_quote_erosion_executed (cost=0.42..2.44 rows=1 width=26) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((id_contract = 8) AND (dt_reference = 20,200,601))
13. 2.002 2.002 ↑ 1.0 1 1,001

Index Scan using tb_dist_fund_daily_pk on tb_dist_fund_daily (cost=0.42..0.98 rows=1 width=27) (actual time=0.002..0.002 rows=1 loops=1,001)

  • Index Cond: ((id_contract = 8) AND (id_instrument = tb_dist_certificate_daily.id_instrument) AND (dt_reference = 20,200,601))
14.          

SubPlan (for Nested Loop)

15. 1.001 7.007 ↑ 1.0 1 1,001

Nested Loop (cost=0.70..4.76 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1,001)

16. 4.004 4.004 ↑ 1.0 1 1,001

Index Scan using tb_core_customer_broker_accounts_pk on tb_core_customer_broker_accounts (cost=0.42..2.46 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1,001)

  • Index Cond: ((id_contract = tb_core_customer_data.id_contract) AND (id_customer = tb_core_customer_data.id_customer))
  • Filter: (((tb_dist_certificate.cd_account)::character varying)::text = (((vl_account_number)::text || ''::text) || (vl_account_digit)::text))
  • Rows Removed by Filter: 0
17. 2.002 2.002 ↑ 1.0 1 1,001

Index Scan using tb_core_broker_office_pk on tb_core_broker_office (cost=0.28..2.30 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=1,001)

  • Index Cond: ((id_contract = tb_core_customer_data.id_contract) AND (id_office = tb_core_customer_broker_accounts.id_office))