explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8JD5

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 17.267 ↑ 2.0 1 1

ppend (cost=0.71..31,947.40 rows=2 width=647) (actual time=4.307..17.267 rows=1 loops=1)

  • = operation2.id_customer) AND (account2.cd_account_sinacor = operation2.cd_account))
2. 0.064 17.252 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.71..15,973.69 rows=1 width=673) (actual time=4.307..17.252 rows=1 loops=1)

  • Join Filter: ((account.id_contract = operation.id_contract) AND (account.id_manager = operation.id_manager) AND (account.id_customer = operation.id_customer) AND (account.cd_account_sinacor = operation.cd_account))
  • Rows Removed by Join Filter: 453
3. 0.003 17.081 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.71..15,955.00 rows=1 width=188) (actual time=4.137..17.081 rows=1 loops=1)

  • Join Filter: ((tb_dist_fund_dac.id_contract = fund.id_contract) AND (tb_dist_fund_dac.id_dac = fund.id_dac))
  • Rows Removed by Join Filter: 3
4. 0.030 17.072 ↑ 1.0 1 1

Nested Loop (cost=0.71..15,953.90 rows=1 width=160) (actual time=4.130..17.072 rows=1 loops=1)

  • Join Filter: (operation.id_instrument = fund.id_instrument)
  • Rows Removed by Join Filter: 171
5. 16.938 16.967 ↑ 1.0 1 1

Nested Loop (cost=0.71..15,931.03 rows=1 width=96) (actual time=4.081..16.967 rows=1 loops=1)

  • -> Index Scan using tb_core_customer_data_pk on tb_core_customer_data customer (cost=0.42..15922.70 rows=1 width=32)(actual time=4.049..16.931 rows=1 loops=1)
6. 0.029 0.029 ↑ 1.0 1 1

Index Scan using tb_dist_operation_application_pk on tb_dist_operation_application operation (cost=0.29..8.32 rows=1 width=68) (actual time=0.027..0.029 rows=1 loops=1)

  • Index Cond: ((id_contract = 39) AND (id_dist_operation_application = 753))
  • Filter: (id_status_order = ANY ('{1,2,4,17,21,22,23,24}'::integer[]))
  • Index Cond: (id_customer = operation.id_customer)
7. 0.075 0.075 ↑ 1.0 172 1

Seq Scan on tb_dist_fund_selected fund (cost=0.00..20.72 rows=172 width=68) (actual time=0.012..0.075 rows=172 loops=1)

8. 0.006 0.006 ↑ 1.0 4 1

Seq Scan on tb_dist_fund_dac (cost=0.00..1.04 rows=4 width=44) (actual time=0.005..0.006 rows=4 loops=1)

9. 0.107 0.107 ↓ 1.0 453 1

Seq Scan on tb_dist_customer_account account (cost=0.00..9.65 rows=452 width=25) (actual time=0.008..0.107 rows=453 loops=1)

  • Filter: (id_contract = 39)
10. 0.000 0.015 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.70..15,973.69 rows=1 width=619) (actual time=0.015..0.015 rows=0 loops=1)

  • Join Filter: ((account2.id_contract = operation2.id_contract) AND (account2.id_manager = operation2.id_manager) AND (account2.id_customer
11. 0.001 0.015 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.70..15,955.00 rows=1 width=195) (actual time=0.015..0.015 rows=0 loops=1)

  • Join Filter: ((tb_dist_fund_dac_1.id_contract = fund_2.id_contract) AND (tb_dist_fund_dac_1.id_dac = fund_2.id_dac))
12. 0.000 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.70..15,953.90 rows=1 width=167) (actual time=0.014..0.014 rows=0 loops=1)

  • Join Filter: (operation2.id_instrument = fund_2.id_instrument)
13. 0.001 0.014 ↓ 0.0 0 1

Nested Loop (cost=0.70..15,931.03 rows=1 width=107) (actual time=0.014..0.014 rows=0 loops=1)

14. 0.013 0.013 ↓ 0.0 0 1

Index Scan using tb_dist_operation_withdraw_pk on tb_dist_operation_withdraw operation2 (cost=0.28..8.31 rows=1 width=79) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: ((id_contract = 39) AND (id_dist_operation_withdraw = '-1'::integer))
  • Filter: (id_status_order = ANY ('{1,2,4,17,21,22,23,24}'::integer[]))
15. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_core_customer_data_pk on tb_core_customer_data customer_1 (cost=0.42..15,922.70 rows=1 width=32) (never executed)

  • Index Cond: (id_customer = operation2.id_customer)
16. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_fund_selected fund_2 (cost=0.00..20.72 rows=172 width=64) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_fund_dac tb_dist_fund_dac_1 (cost=0.00..1.04 rows=4 width=44) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_dist_customer_account account2 (cost=0.00..9.65 rows=452 width=25) (never executed)

  • Filter: (id_contract = 39)
Planning time : 3.234 ms
Execution time : 17.693 ms