explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f6rX : priginal offset1

Settings
# exclusive inclusive rows x rows loops node
1. 0.155 305.848 ↑ 1.0 1,000 1

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

2. 3.967 305.693 ↑ 19.4 1,001 1

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

3. 0.587 132.557 ↑ 15.0 1,001 1

Nested Loop Left Join (cost=1.98..394,721.70 rows=15,015 width=191) (actual time=1.103..132.557 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. 1.118 131.970 ↑ 15.0 1,001 1

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

5. 1.287 127.849 ↑ 15.0 1,001 1

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

6. 1.157 124.560 ↑ 15.0 1,001 1

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

7. 1.281 1.281 ↑ 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.026..1.281 rows=1,001 loops=1)

  • Index Cond: ((id_contract = 8) AND (dt_reference = 20,200,601))
8. 122.122 122.122 ↑ 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.122..0.122 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. 2.002 167.167 ↑ 1.0 1 1,001

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

16. 163.163 163.163 ↑ 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.151..0.163 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))