explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R0sf

Settings
# exclusive inclusive rows x rows loops node
1. 12.911 5,358.023 ↓ 0.0 0 1

Gather (cost=2,548.38..3,738.34 rows=54 width=1,810) (actual time=5,357.804..5,358.023 rows=0 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.002 5,345.112 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,548.38..2,291.62 rows=14 width=1,655) (actual time=5,345.111..5,345.112 rows=0 loops=5)

3. 0.001 5,345.110 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,548.24..2,289.35 rows=14 width=1,655) (actual time=5,345.110..5,345.110 rows=0 loops=5)

4. 0.000 5,345.109 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,548.11..2,287.20 rows=14 width=611) (actual time=5,345.109..5,345.109 rows=0 loops=5)

5. 0.001 5,345.109 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,547.83..2,283.10 rows=14 width=597) (actual time=5,345.108..5,345.109 rows=0 loops=5)

6. 0.001 5,345.108 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,547.40..2,276.14 rows=14 width=597) (actual time=5,345.108..5,345.108 rows=0 loops=5)

  • Hash Cond: (si.currency_id = c.id)
7. 0.001 5,345.107 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,546.27..2,274.94 rows=14 width=601) (actual time=5,345.107..5,345.107 rows=0 loops=5)

8. 0.001 5,345.106 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,545.99..2,270.81 rows=14 width=591) (actual time=5,345.106..5,345.106 rows=0 loops=5)

9. 0.001 5,345.105 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,545.71..2,182.67 rows=14 width=581) (actual time=5,345.105..5,345.105 rows=0 loops=5)

10. 0.001 5,345.104 ↓ 0.0 0 5 / 5

Nested Loop Left Join (cost=1,545.29..2,176.17 rows=14 width=465) (actual time=5,345.104..5,345.104 rows=0 loops=5)

11. 0.001 5,345.103 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,544.87..2,169.53 rows=14 width=457) (actual time=5,345.103..5,345.103 rows=0 loops=5)

  • Hash Cond: (ps_apfeps.apfda_id = ps_apfeps_t_apfda.id)
12. 0.000 5,345.102 ↓ 0.0 0 5 / 5

Nested Loop (cost=1,541.69..2,166.15 rows=14 width=447) (actual time=5,345.102..5,345.102 rows=0 loops=5)

13. 0.002 5,345.102 ↓ 0.0 0 5 / 5

Hash Left Join (cost=1,541.26..1,943.33 rows=104 width=431) (actual time=5,345.101..5,345.102 rows=0 loops=5)

  • Hash Cond: (fi_si.originatordivision_id = od_db.id)
14. 0.002 5,345.100 ↓ 0.0 0 5 / 5

Merge Join (cost=1,539.95..1,941.66 rows=104 width=419) (actual time=5,345.100..5,345.100 rows=0 loops=5)

  • Merge Cond: (si.nettingbundle_id = nb.id)
15. 701.924 5,345.098 ↑ 4,457.0 1 5 / 5

Nested Loop (cost=0.86..1,790,308.62 rows=4,457 width=371) (actual time=5,345.098..5,345.098 rows=1 loops=5)

16. 781.144 781.144 ↑ 1.3 1,287,343 5 / 5

Parallel Index Scan using supplierinvoice_nettingbundle_idx on supplierinvoice si (cost=0.43..784,438.39 rows=1,642,460 width=191) (actual time=0.012..781.144 rows=1,287,343 loops=5)

17. 3,862.030 3,862.030 ↓ 0.0 0 6,436,716 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement ps_eps (cost=0.43..0.61 rows=1 width=196) (actual time=0.003..0.003 rows=0 loops=6,436,716)

  • Index Cond: (invoice_id = si.id)
  • Filter: (creationdate <= '2017-02-06'::date)
  • Rows Removed by Filter: 1
18. 0.000 0.000 ↓ 0.0 0 / 5

Sort (cost=1,539.08..1,539.09 rows=4 width=56) (never executed)

  • Sort Key: nb.id
19. 0.000 0.000 ↓ 0.0 0 / 5

Nested Loop (cost=1.29..1,539.04 rows=4 width=56) (never executed)

20. 0.000 0.000 ↓ 0.0 0 / 5

Nested Loop (cost=0.86..1,536.59 rows=4 width=56) (never executed)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
21. 0.000 0.000 ↓ 0.0 0 / 5

Nested Loop (cost=0.86..1,534.05 rows=22 width=64) (never executed)

22. 0.000 0.000 ↓ 0.0 0 / 5

Nested Loop (cost=0.43..1,457.12 rows=172 width=56) (never executed)

23. 0.000 0.000 ↓ 0.0 0 / 5

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (never executed)

24. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps (cost=0.43..8.45 rows=1 width=40) (never executed)

  • Index Cond: (invoice_id = nb.surplus_id)
25. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement fi_ps_apfeps (cost=0.42..0.45 rows=1 width=24) (never executed)

  • Index Cond: (id = fi_eps.id)
26. 0.000 0.000 ↓ 0.0 0 / 5

Materialize (cost=0.00..1.27 rows=4 width=8) (never executed)

27. 0.000 0.000 ↓ 0.0 0 / 5

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.25 rows=4 width=8) (never executed)

  • Filter: (buyer_id = 67,002,626)
28. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using supplierinvoice_pkey on supplierinvoice fi_si (cost=0.43..0.61 rows=1 width=24) (never executed)

  • Index Cond: (id = fi_eps.invoice_id)
29. 0.000 0.000 ↓ 0.0 0 / 5

Hash (cost=1.14..1.14 rows=14 width=28) (never executed)

30. 0.000 0.000 ↓ 0.0 0 / 5

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (never executed)

31. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement ps_apfeps (cost=0.42..2.14 rows=1 width=24) (never executed)

  • Index Cond: (id = ps_eps.id)
32. 0.000 0.000 ↓ 0.0 0 / 5

Hash (cost=2.93..2.93 rows=20 width=26) (never executed)

33. 0.000 0.000 ↓ 0.0 0 / 5

Merge Right Join (cost=2.05..2.93 rows=20 width=26) (never executed)

  • Merge Cond: (ps_eps_t_bc_cb.id = ps_apfeps_t_apfda.bank_id)
34. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using corporatebase_pkey on corporatebase ps_eps_t_bc_cb (cost=0.28..234.48 rows=1,650 width=26) (never executed)

35. 0.000 0.000 ↓ 0.0 0 / 5

Sort (cost=1.63..1.68 rows=20 width=16) (never executed)

  • Sort Key: ps_apfeps_t_apfda.bank_id
36. 0.000 0.000 ↓ 0.0 0 / 5

Seq Scan on apfdebtoragreement ps_apfeps_t_apfda (cost=0.00..1.20 rows=20 width=16) (never executed)

37. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using financingcontextbase_pkey on financingcontextbase ps_apffc_fc_fcb (cost=0.42..0.47 rows=1 width=24) (never executed)

  • Index Cond: (id = ps_apfeps.financingcontext_id)
38. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using apffinancingcontext_pkey on apffinancingcontext fi_ps_apffc_fc_afc (cost=0.42..0.46 rows=1 width=132) (never executed)

  • Index Cond: (fi_ps_apfeps.financingcontext_id = id)
39. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using corporatebase_pkey on corporatebase od_c_cb (cost=0.28..6.29 rows=1 width=26) (never executed)

  • Index Cond: (id = od_db.buyer_id)
40. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..0.30 rows=1 width=26) (never executed)

  • Index Cond: (id = si.supplier_id)
41. 0.000 0.000 ↓ 0.0 0 / 5

Hash (cost=1.06..1.06 rows=6 width=12) (never executed)

42. 0.000 0.000 ↓ 0.0 0 / 5

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (never executed)

43. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..0.50 rows=1 width=16) (never executed)

  • Index Cond: (si.importbatch_id = id)
44. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using earlypaymentadvice_pkey on earlypaymentadvice fi_eps_epa (cost=0.28..0.29 rows=1 width=30) (never executed)

  • Index Cond: (id = fi_eps.earlypaymentadvice_id)
45. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using invoicepaymentadvice_pkey on invoicepaymentadvice fi_ipa (cost=0.14..0.15 rows=1 width=1,052) (never executed)

  • Index Cond: (fi_si.paymentadvice_id = id)
46. 0.000 0.000 ↓ 0.0 0 / 5

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction fi_bpt (cost=0.14..0.15 rows=1 width=16) (never executed)

  • Index Cond: (mapping_id = fi_eps.earlypaymentmapping_id)
47.          

SubPlan (for Gather)

48. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.15..8.16 rows=1 width=8) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt (cost=0.14..8.15 rows=1 width=8) (never executed)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 10.910 ms
Execution time : 5,358.396 ms