explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qsYc

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 25,175.456 ↓ 50.0 50 1

Limit (cost=2,171.50..2,171.50 rows=1 width=387) (actual time=25,175.420..25,175.456 rows=50 loops=1)

2. 2.385 25,175.448 ↓ 50.0 50 1

Sort (cost=2,171.50..2,171.50 rows=1 width=387) (actual time=25,175.417..25,175.448 rows=50 loops=1)

  • Sort Key: tb_dist_operation_application.id_dist_operation_application DESC
  • Sort Method: top-N heapsort Memory: 50kB
3. 0.286 25,173.063 ↓ 324.0 324 1

Append (cost=0.15..2,171.50 rows=1 width=387) (actual time=80.884..25,173.063 rows=324 loops=1)

4. 6.350 25,172.777 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.15..2,171.50 rows=1 width=387) (actual time=80.883..25,172.777 rows=324 loops=1)

  • Join Filter: ((tb_dist_fund_dac.id_contract = tb_dist_fund_selected.id_contract) AND (tb_dist_fund_dac.id_dac = tb_dist_fund_selected.id_dac))
  • Rows Removed by Join Filter: 972
5. 3.011 25,165.131 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.15..2,171.29 rows=1 width=273) (actual time=80.848..25,165.131 rows=324 loops=1)

  • Join Filter: ((dm_tp_requestor.id_contract = tb_dist_operation_application.id_contract) AND ((dm_tp_requestor.tp_requestor)::text = (tb_dist_operation_application_log.tp_requestor)::text))
  • Rows Removed by Join Filter: 972
6. 763.234 25,161.148 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.15..2,171.08 rows=1 width=252) (actual time=80.836..25,161.148 rows=324 loops=1)

  • Join Filter: ((tb_dist_operation_application_log.id_contract = tb_dist_operation_application.id_contract) AND (tb_dist_operation_application_log.id_dist_operation_application = tb_dist_operation_application.id_dist_operation_application))
  • Rows Removed by Join Filter: 6933276
7. 1.228 243.066 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.15..33.11 rows=1 width=242) (actual time=0.677..243.066 rows=324 loops=1)

  • Join Filter: (dm_dist_operation_status.id_status_order = tb_dist_operation_application.id_status_order)
8. 2.610 240.218 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.15..32.88 rows=1 width=224) (actual time=0.674..240.218 rows=324 loops=1)

  • Join Filter: ((dm_dist_operation_type.cd_operation_type)::text = (tb_dist_operation_application.cd_operation_type)::text)
  • Rows Removed by Join Filter: 3888
9. 1.172 236.312 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.15..32.65 rows=1 width=164) (actual time=0.665..236.312 rows=324 loops=1)

10. 1.221 16.440 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.11..1.72 rows=1 width=168) (actual time=0.059..16.440 rows=324 loops=1)

11. 1.167 11.655 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.10..1.31 rows=1 width=115) (actual time=0.051..11.655 rows=324 loops=1)

12. 1.523 6.276 ↓ 324.0 324 1

Nested Loop Left Join (cost=0.06..0.86 rows=1 width=78) (actual time=0.026..6.276 rows=324 loops=1)

13. 2.161 2.161 ↓ 324.0 324 1

Index Scan using tb_dist_operation_application_para_oms on tb_dist_operation_application (cost=0.03..0.43 rows=1 width=77) (actual time=0.017..2.161 rows=324 loops=1)

  • Index Cond: ((id_contract = 39) AND (id_status_order = 1))
14. 2.592 2.592 ↓ 0.0 0 324

Index Scan using tb_dist_customer_account_pk on tb_dist_customer_account (cost=0.03..0.43 rows=1 width=25) (actual time=0.008..0.008 rows=0 loops=324)

  • Index Cond: ((id_contract = tb_dist_operation_application.id_contract) AND (id_contract = 39) AND (id_customer = tb_dist_operation_application.id_customer) AND (id_manager = tb_dist_operation_application.id_manager) AND (cd_account_sinacor = tb_dist_operation_application.cd_account))
15. 4.212 4.212 ↑ 1.0 1 324

Index Scan using tb_core_customer_data_pk on tb_core_customer_data (cost=0.04..0.44 rows=1 width=45) (actual time=0.011..0.013 rows=1 loops=324)

  • Index Cond: ((tb_dist_operation_application.id_contract = id_contract) AND (id_contract = 39) AND (id_customer = tb_dist_operation_application.id_customer))
16. 3.564 3.564 ↑ 1.0 1 324

Index Scan using tb_dist_fund_selected_pk on tb_dist_fund_selected (cost=0.01..0.42 rows=1 width=53) (actual time=0.009..0.011 rows=1 loops=324)

  • Index Cond: ((id_contract = tb_dist_operation_application.id_contract) AND (id_contract = 39) AND (id_instrument = tb_dist_operation_application.id_instrument))
17. 218.700 218.700 ↓ 0.0 0 324

Index Scan using tb_dist_certificate_idx1 on tb_dist_certificate (cost=0.04..30.93 rows=1 width=12) (actual time=0.675..0.675 rows=0 loops=324)

  • Index Cond: ((id_contract = tb_dist_operation_application.id_contract) AND (id_contract = 39) AND (id_instrument = tb_dist_operation_application.id_instrument))
  • Filter: (id_dist_operation_application = tb_dist_operation_application.id_dist_operation_application)
  • Rows Removed by Filter: 928
18. 1.296 1.296 ↑ 1.0 13 324

Seq Scan on dm_dist_operation_type (cost=0.00..0.21 rows=13 width=71) (actual time=0.001..0.004 rows=13 loops=324)

19. 1.620 1.620 ↑ 1.0 1 324

Seq Scan on dm_dist_operation_status (cost=0.00..0.23 rows=1 width=22) (actual time=0.001..0.005 rows=1 loops=324)

  • Filter: (id_status_order = 1)
  • Rows Removed by Filter: 19
20. 24,154.848 24,154.848 ↓ 1.0 21,400 324

Seq Scan on tb_dist_operation_application_log (cost=0.00..2,105.90 rows=21,382 width=18) (actual time=0.002..74.552 rows=21,400 loops=324)

  • Filter: ((id_contract = 39) AND ((action)::text = 'INSERT'::text))
  • Rows Removed by Filter: 187467
21. 0.972 0.972 ↑ 1.0 4 324

Seq Scan on dm_tp_requestor (cost=0.00..0.21 rows=4 width=48) (actual time=0.003..0.003 rows=4 loops=324)

  • Filter: (id_contract = 39)
22. 1.296 1.296 ↑ 1.0 4 324

Seq Scan on tb_dist_fund_dac (cost=0.00..0.21 rows=4 width=18) (actual time=0.002..0.004 rows=4 loops=324)

  • Filter: (id_contract = 39)
Planning time : 12.163 ms
Execution time : 25,175.892 ms