explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OFvB

Settings
# exclusive inclusive rows x rows loops node
1. 0.097 20.937 ↑ 1.0 1,000 1

Limit (cost=28.27..25,886.69 rows=1,000 width=231) (actual time=0.206..20.937 rows=1,000 loops=1)

2. 2.093 20.840 ↑ 19.1 1,001 1

Nested Loop (cost=2.41..493,820.65 rows=19,097 width=231) (actual time=0.157..20.840 rows=1,001 loops=1)

3. 0.377 10.739 ↑ 14.9 1,001 1

Nested Loop Left Join (cost=1.98..388,135.06 rows=14,895 width=191) (actual time=0.084..10.739 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.145 10.362 ↑ 14.9 1,001 1

Nested Loop Left Join (cost=1.56..387,387.41 rows=14,895 width=193) (actual time=0.071..10.362 rows=1,001 loops=1)

5. 0.791 7.214 ↑ 14.9 1,001 1

Nested Loop Left Join (cost=1.27..374,998.32 rows=14,895 width=157) (actual time=0.059..7.214 rows=1,001 loops=1)

6. 0.566 5.422 ↑ 14.9 1,001 1

Nested Loop (cost=0.99..363,934.86 rows=14,895 width=120) (actual time=0.047..5.422 rows=1,001 loops=1)

7. 0.828 0.828 ↑ 246.6 1,007 1

Index Scan using tb_dist_certificate_daily_id_contract_dt_reference_idx on tb_dist_certificate_daily (cost=0.57..112,861.89 rows=248,285 width=82) (actual time=0.026..0.828 rows=1,007 loops=1)

  • Index Cond: ((id_contract = 8) AND (dt_reference = 20,200,603))
8. 4.028 4.028 ↑ 1.0 1 1,007

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,007)

  • 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)
  • Rows Removed by Filter: 0
9. 1.001 1.001 ↑ 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.001..0.001 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.91 rows=2 width=26) (actual time=0.000..0.000 rows=0 loops=1,001)

12. 0.009 0.009 ↓ 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.90 rows=2 width=26) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: ((id_contract = 8) AND (dt_reference = 20,200,603))
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,603))
14.          

SubPlan (for Nested Loop)

15. 1.001 6.006 ↑ 1.0 1 1,001

Nested Loop (cost=0.70..4.76 rows=1 width=4) (actual time=0.006..0.006 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.003..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. 1.001 1.001 ↑ 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.001..0.001 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))