explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FNTS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 314.002 ↓ 1.2 10 1

Limit (cost=1,679.97..1,679.99 rows=8 width=380) (actual time=313.998..314.002 rows=10 loops=1)

  • (actual time=0.018..0.158 rows=453 loops=1)
  • 39) AND (id_instrument = tb_dist_operation_application.id_instrument))
  • rows=0 loops=1)
2. 0.972 313.999 ↓ 1.2 10 1

Sort (cost=1,679.97..1,679.99 rows=8 width=380) (actual time=313.996..313.999 rows=10 loops=1)

  • Sort Key: tb_dist_operation_application.id_dist_operation_application DESC
  • Sort Method: top-N heapsort Memory: 28kB
3. 0.593 313.027 ↓ 40.1 321 1

Append (cost=19.83..1,679.85 rows=8 width=380) (actual time=1.564..313.027 rows=321 loops=1)

4. 4.169 312.434 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.83..1,312.90 rows=7 width=380) (actual time=1.564..312.434 rows=321 loops=1)

  • Join Filter: ((tb_dist_operation_application_pendencies.id_contract = tb_dist_operation_application.id_contract) AND (tb_dist_operation_application_pendencies.id_dist_operation_application = tb_dist_operation_application.id_dist_operation_application) AND (tb_dist_operation_application_pendencies.id_pendency = tb_dist_operation_application.id_pendency))
  • Rows Removed by Join Filter: 3,210
5. 0.921 308.265 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.83..1,292.28 rows=7 width=244) (actual time=1.521..308.265 rows=321 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: 963
6. 2.055 307.344 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.83..1,291.10 rows=7 width=216) (actual time=1.503..307.344 rows=321 loops=1)

  • Join Filter: (dm_dist_operation_status.id_status_order = tb_dist_operation_application.id_status_order)
  • Rows Removed by Join Filter: 8,025
7. 1.679 305.289 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.83..1,287.75 rows=7 width=184) (actual time=1.490..305.289 rows=321 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: 3,852
8. 3.227 303.610 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.83..1,285.22 rows=7 width=152) (actual time=1.454..303.610 rows=321 loops=1)

9. 294.709 300.383 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.69..1,251.98 rows=7 width=102) (actual time=1.438..300.383 rows=321 loops=1)

  • -> Index Scan using tb_dist_certificate_idx1 on tb_dist_certificate (cost=0.29..156.40 rows=1
10. 0.473 5.674 ↓ 45.9 321 1

Nested Loop Left Join (cost=19.40..157.13 rows=7 width=102) (actual time=0.475..5.674 rows=321 loops=1)

11. 0.722 1.991 ↓ 45.9 321 1

Hash Left Join (cost=18.98..97.95 rows=7 width=72) (actual time=0.453..1.991 rows=321 loops=1)

  • Hash Cond: ((tb_dist_operation_application.id_contract = tb_dist_customer_account.id_contract) AND (tb_dist_operation_application.id_manager = tb_dist_customer_account.id_manager) AND (tb_dist_operation_application.id_customer =tb_dist_customer_account.id_customer) AND (tb_dist_operation_application.cd_account = tb_dist_customer_account.cd_account_sinacor))
12. 0.900 0.900 ↓ 45.9 321 1

Index Scan using tb_dist_operation_application_search_idx on tb_dist_operation_application (cost=0.29..79.11 rows=7 width=71) (actual time=0.049..0.900 rows=321 loops=1)

  • Index Cond: ((id_contract = 39) AND (id_status_order = ANY ('{0,1,2,3,7,17,18,19,20,21,22,23,24,25,26}'::integer[])) AND (dt_operation >= 20,200,803) AND (dt_operation <= 20,200,803))
13. 0.369 0.369 ↓ 1.0 453 1

Hash (cost=9.65..9.65 rows=452 width=25) (actual time=0.369..0.369 rows=453 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 37kB
14. 0.000 0.000 ↓ 0.0

Seq Scan on tb_dist_customer_account (cost=0.00..9.65 rows=452 width=25) (actual rows= loops=)

  • Filter: (id_contract = 39)
15. 3.210 3.210 ↓ 0.0 1 321

Index Scan using tb_core_customer_data_pk on tb_core_customer_data (cost=0.42..8.44rows=1 width=38) (cost=0..0 rows=0 width=0) (actual time=0.009..0.010 rows=1 loops=321)

  • Index Cond: ((tb_dist_operation_application.id_contract = id_contract) AND (id_contract = 39) AND (id_customer = tb_dist_operation_application.id_customer))
16. 290.013 294.036 ↓ 0.0 0 321

width=12) (cost=0..0 rows=0 width=0) (actual time=0.916..0.916 rows=0 loops=321)

  • Index Cond: ((id_contract = tb_dist_operation_application.id_contract) AND (id_contract =
  • Filter: (id_dist_operation_application = tb_dist_operation_application.id_dist_operation_application)
  • Rows Removed by Filter: 1,423
17. 1.926 1.926 ↑ 1.0 1 321

Index Scan using tb_dist_fund_selected_pk on tb_dist_fund_selected (cost=0.14..4.74 rows=1 width=54) (actual time=0.005..0.006 rows=1 loops=321)

  • Index Cond: ((id_contract = tb_dist_operation_application.id_contract) AND (id_contract = 39) AND (id_instrument = tb_dist_operation_application.id_instrument))
18. 0.321 0.321 ↑ 1.0 13 321

Materialize (cost=0.00..1.19 rows=13 width=64) (actual time=0.000..0.001 rows=13 loops=321)

  • -> Seq Scan on dm_dist_operation_type (cost=0.00..1.13 rows=13 width=64) (actual time=0.009..0.013rows=13 loops=1)
19. 0.630 0.642 ↓ 1.3 26 321

Materialize (cost=0.00..1.30 rows=20 width=36) (actual time=0.000..0.002 rows=26 loops=321)

20. 0.012 0.012 ↓ 1.3 26 1

Seq Scan on dm_dist_operation_status (cost=0.00..1.20 rows=20 width=36) (actual time=0.007..0.012 rows=26 loops=1)

21. 0.313 0.321 ↓ 4.0 4 321

Materialize (cost=0.00..1.05 rows=1 width=44) (actual time=0.000..0.001 rows=4 loops=321)

22. 0.008 0.008 ↓ 4.0 4 1

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

  • Filter: (id_contract = 39)
23. 0.321 0.321 ↓ 2.5 10 321

Materialize (cost=0.00..20.02 rows=4 width=42) (actual time=0.000..0.001 rows=10 loops=321)

  • -> Seq Scan on tb_dist_operation_application_pendencies (cost=0.00..20.00 rows=4 width=42) (actual time=0.006..0.007rows=10 loops=1)
  • Filter: (id_contract = 39)
24. 0.001 0.492 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.42..366.87 rows=1 width=381) (actual time=0.492..0.492 rows=0 loops=1)

25. 0.001 0.491 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.27..358.68 rows=1 width=246) (actual time=0.491..0.491 rows=0 loops=1)

26. 0.000 0.490 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.00..350.37 rows=1 width=245) (actual time=0.490..0.490 rows=0 loops=1)

  • Join Filter: ((tb_dist_fund_dac_1.id_contract = tb_dist_fund_selected_1.id_contract) AND (tb_dist_fund_dac_1.id_dac = tb_dist_fund_selected_1.id_dac))
27. 0.002 0.490 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.00..349.30 rows=1 width=217) (actual time=0.490..0.490 rows=0 loops=1)

28. 0.000 0.488 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.57..340.85 rows=1 width=183) (actual time=0.488..0.488 rows=0 loops=1)

29. 0.001 0.488 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.43..324.48 rows=1 width=183) (actual time=0.488..0.488 rows=0 loops=1)

  • -> Index Scan using tb_dist_fund_selected_pk on tb_dist_fund_selected tb_dist_fund_selected_1
30. 0.002 0.487 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.28..316.30 rows=1 width=133) (actual time=0.487..0.487 rows=0 loops=1)

  • Join Filter: (dm_dist_operation_status_1.id_status_order = tb_dist_operation_withdraw.id_status_order)
  • -> Nested Loop Left Join (cost=0.28..314.85 rows=1 width=101) (actual time=0.487..0.487
  • Join Filter: ((dm_dist_operation_type_1.cd_operation_type)::text = (tb_dist_operation_withdraw.cd_operation_type)::text)
31. 0.485 0.485 ↓ 0.0 0 1

Index Scan using tb_dist_operation_withdraw_quote_erosin_idx on tb_dist_operation_withdraw (cost=0.28..313.56 rows=1 width=69) (actual time=0.485..0.485 rows=0 loops=1)

  • Index Cond: ((id_contract = 39) AND (dt_operation >= 20,200,803) AND (dt_operation <= 20,200,803))
  • Filter: (id_status_order = ANY ('{0,1,2,3,7,17,18,19,20,21,22,23,24,25,26}'::integer[]))
32. 0.000 0.000 ↓ 0.0 0

Seq Scan on dm_dist_operation_type dm_dist_operation_type_1 (cost=0.00..1.13 rows=13 width=64) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Seq Scan on dm_dist_operation_status dm_dist_operation_status_1 (cost=0.00..1.20 rows=20 width=36) (never executed)

34. 0.000 0.000 ↓ 0.0 0

(cost=0.14..8.17 rows=1 width=54) (cost=0..0 rows=0 width=0) (never executed)

  • Index Cond: ((tb_dist_operation_withdraw.id_contract = id_contract) AND (id_contract = 39) AND (id_instrument = tb_dist_operation_withdraw.id_instrument))
  • -> Index Only Scan using tb_dist_operation_withdraw_request_pk on tb_dist_operation_withdraw_request
35. 0.000 0.000 ↓ 0.0 0

(cost=0.15..16.35 rows=1 width=8) (cost=0..0 rows=0 width=0) (never executed)

  • Index Cond: ((id_contract = tb_dist_operation_withdraw.id_contract) AND (id_contract = 39) AND(id_dist_operation_withdraw = tb_dist_operation_withdraw.id_dist_operation_withdraw))
  • Filter: (seq = (SubPlan 2))
  • Heap Fetches: 0
36. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_core_customer_data_pk on tb_core_customer_data tb_core_customer_data_1 (cost=0.42..8.44 rows=1 width=38) (never executed)

  • Index Cond: ((tb_dist_operation_withdraw.id_contract = id_contract) AND (id_contract = 39) AND (id_customer = tb_dist_operation_withdraw.id_customer))
37. 0.000 0.000 ↓ 0.0 0

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

  • Filter: (id_contract = 39)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_customer_account_pk on tb_dist_customer_account tb_dist_customer_account_1 (cost=0.27..8.30 rows=1 width=25) (never executed)

  • Index Cond: ((id_contract = tb_dist_operation_withdraw.id_contract) AND (id_contract = 39) AND (id_customer = tb_dist_operation_withdraw.id_customer) AND (id_manager = tb_dist_operation_withdraw.id_manager) AND (cd_account_sinacor = tb_dist_operation_withdraw.cd_account))
39. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_dist_operation_withdraw_pendencies_pkey on tb_dist_operation_withdraw_pendencies (cost=0.15..8.18 rows=1 width=42) (never executed)

  • Index Cond: (id_pendency = tb_dist_operation_withdraw.id_pendency)
  • Filter: ((id_contract = 39) AND (id_contract = tb_dist_operation_withdraw.id_contract) AND (id_dist_operation_withdraw= tb_dist_operation_withdraw.id_dist_operation_withdraw))
40.          

SubPlan (for (cost=0.15..16.35 rows=1 width=8))

41. 0.000 0.000 ↓ 0.0 0

Result (cost=8.17..8.18 rows=1 width=4) (never executed)

42.          

Initplan (for Result)

43. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.15..8.17 rows=1 width=4) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using tb_dist_operation_withdraw_request_pk on tb_dist_operation_withdraw_request inner_request (cost=0.15..8.17 rows=1 width=4) (never executed)

  • Index Cond: ((id_contract = tb_dist_operation_withdraw_request.id_contract) AND (id_dist_operation_withdraw = tb_dist_operation_withdraw_request.id_dist_operation_withdraw) AND (seq IS NOT NULL))
  • Filter: ((cd_status)::text <> 'PENDENT'::text)
Planning time : 12.384 ms
Execution time : 315.130 ms