explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z9VJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.587 8.459 ↓ 4.6 256 1

Nested Loop Left Join (cost=215.94..3,207.81 rows=56 width=2,686) (actual time=1.775..8.459 rows=256 loops=1)

2. 0.308 7.616 ↓ 4.6 256 1

Nested Loop Left Join (cost=215.80..2,741.73 rows=56 width=387) (actual time=1.760..7.616 rows=256 loops=1)

3. 0.371 7.308 ↓ 4.6 256 1

Nested Loop Left Join (cost=215.67..2,732.63 rows=56 width=387) (actual time=1.757..7.308 rows=256 loops=1)

4. 0.182 6.681 ↓ 4.6 256 1

Hash Left Join (cost=215.39..2,716.25 rows=56 width=373) (actual time=1.748..6.681 rows=256 loops=1)

  • Hash Cond: (scn.currency_id = c.id)
5. 0.298 6.490 ↓ 4.6 256 1

Nested Loop Left Join (cost=214.26..2,714.87 rows=56 width=377) (actual time=1.733..6.490 rows=256 loops=1)

6. 0.419 5.680 ↓ 4.6 256 1

Nested Loop Left Join (cost=213.83..2,257.91 rows=56 width=377) (actual time=1.725..5.680 rows=256 loops=1)

7. 0.180 5.005 ↓ 4.6 256 1

Hash Left Join (cost=213.55..2,222.05 rows=56 width=367) (actual time=1.705..5.005 rows=256 loops=1)

  • Hash Cond: (od_db.buyer_id = od_c_cb.id)
8. 0.287 3.257 ↓ 4.6 256 1

Nested Loop Left Join (cost=2.42..2,010.78 rows=56 width=357) (actual time=0.129..3.257 rows=256 loops=1)

9. 0.264 2.970 ↓ 4.6 256 1

Nested Loop (cost=1.99..1,543.05 rows=56 width=327) (actual time=0.126..2.970 rows=256 loops=1)

10. 0.094 2.502 ↓ 10.2 51 1

Nested Loop Left Join (cost=1.71..1,533.42 rows=5 width=184) (actual time=0.119..2.502 rows=51 loops=1)

11. 0.113 2.306 ↓ 10.2 51 1

Nested Loop Left Join (cost=1.29..1,531.10 rows=5 width=68) (actual time=0.112..2.306 rows=51 loops=1)

  • Join Filter: (fi_si.originatordivision_id = od_db.id)
  • Rows Removed by Join Filter: 322
12. 0.057 2.091 ↓ 10.2 51 1

Nested Loop (cost=1.29..1,528.88 rows=5 width=56) (actual time=0.105..2.091 rows=51 loops=1)

  • Join Filter: (nb.surplus_id = fi_si.id)
13. 0.273 1.830 ↓ 10.2 51 1

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.096..1.830 rows=51 loops=1)

  • Join Filter: (fi_ps_apfeps.apfda_id = fi_ps_apfeps_t_apfda.id)
  • Rows Removed by Join Filter: 691
14. 0.084 1.385 ↓ 9.1 172 1

Nested Loop (cost=0.86..1,522.97 rows=19 width=64) (actual time=0.031..1.385 rows=172 loops=1)

15. 0.219 0.785 ↓ 1.2 172 1

Nested Loop (cost=0.43..1,457.55 rows=146 width=56) (actual time=0.024..0.785 rows=172 loops=1)

16. 0.050 0.050 ↑ 1.0 172 1

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.007..0.050 rows=172 loops=1)

17. 0.516 0.516 ↑ 1.0 1 172

Index Scan using earlypaymentsettlement_invoice_idx on earlypaymentsettlement fi_eps (cost=0.43..8.45 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=172)

  • Index Cond: (invoice_id = nb.surplus_id)
  • Filter: (creationdate >= '2019-01-01'::date)
18. 0.516 0.516 ↑ 1.0 1 172

Index Scan using apfearlypaymentsettlement_pkey on apfearlypaymentsettlement fi_ps_apfeps (cost=0.42..0.45 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=172)

  • Index Cond: (id = fi_eps.id)
19. 0.166 0.172 ↑ 1.2 4 172

Materialize (cost=0.00..1.27 rows=5 width=8) (actual time=0.000..0.001 rows=4 loops=172)

20. 0.006 0.006 ↑ 1.0 5 1

Seq Scan on apfdebtoragreement fi_ps_apfeps_t_apfda (cost=0.00..1.25 rows=5 width=8) (actual time=0.003..0.006 rows=5 loops=1)

  • Filter: (bank_id = 3053)
  • Rows Removed by Filter: 15
21. 0.204 0.204 ↑ 1.0 1 51

Index Scan using supplierinvoice_pkey on supplierinvoice fi_si (cost=0.43..0.64 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=51)

  • Index Cond: (id = fi_eps.invoice_id)
22. 0.092 0.102 ↑ 2.0 7 51

Materialize (cost=0.00..1.21 rows=14 width=28) (actual time=0.000..0.002 rows=7 loops=51)

23. 0.010 0.010 ↑ 1.0 14 1

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=28) (actual time=0.003..0.010 rows=14 loops=1)

24. 0.102 0.102 ↑ 1.0 1 51

Index Scan using apffinancingcontext_pkey on apffinancingcontext fi_ps_apffc_fc_afc (cost=0.42..0.46 rows=1 width=132) (actual time=0.002..0.002 rows=1 loops=51)

  • Index Cond: (id = fi_ps_apfeps.financingcontext_id)
25. 0.204 0.204 ↓ 1.2 5 51

Index Scan using suppliercreditnote_nettingbundle_idx on suppliercreditnote scn (cost=0.28..1.88 rows=4 width=151) (actual time=0.002..0.004 rows=5 loops=51)

  • Index Cond: (nettingbundle_id = nb.id)
26. 0.000 0.000 ↓ 0.0 0 256

Index Scan using supplierinvoice_pkey on supplierinvoice ref_si (cost=0.43..8.21 rows=1 width=38) (actual time=0.000..0.000 rows=0 loops=256)

  • Index Cond: (id = scn.referencedinvoice_id)
27. 0.527 1.568 ↑ 1.0 1,650 1

Hash (cost=190.50..190.50 rows=1,650 width=26) (actual time=1.567..1.568 rows=1,650 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
28. 1.041 1.041 ↑ 1.0 1,650 1

Seq Scan on corporatebase od_c_cb (cost=0.00..190.50 rows=1,650 width=26) (actual time=0.002..1.041 rows=1,650 loops=1)

29. 0.256 0.256 ↑ 1.0 1 256

Index Scan using corporatebase_pkey on corporatebase s_cb (cost=0.28..0.64 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=256)

  • Index Cond: (id = scn.supplier_id)
30. 0.512 0.512 ↑ 1.0 1 256

Index Scan using arpimportbatch_pkey on arpimportbatch ib (cost=0.43..8.16 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=256)

  • Index Cond: (scn.importbatch_id = id)
31. 0.004 0.009 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.009..0.009 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.005 0.005 ↑ 1.0 6 1

Seq Scan on crxcurrency c (cost=0.00..1.06 rows=6 width=12) (actual time=0.003..0.005 rows=6 loops=1)

33. 0.256 0.256 ↑ 1.0 1 256

Index Scan using earlypaymentadvice_pkey on earlypaymentadvice fi_eps_epa (cost=0.28..0.29 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=256)

  • Index Cond: (id = fi_eps.earlypaymentadvice_id)
34. 0.000 0.000 ↓ 0.0 0 256

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt (cost=0.14..0.15 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=256)

  • Index Cond: (mapping_id = fi_eps.earlypaymentmapping_id)
35. 0.000 0.000 ↓ 0.0 0 256

Index Scan using invoicepaymentadvice_pkey on invoicepaymentadvice fi_ipa (cost=0.14..0.15 rows=1 width=1,052) (actual time=0.000..0.000 rows=0 loops=256)

  • Index Cond: (fi_si.paymentadvice_id = id)
36.          

SubPlan (for Nested Loop Left Join)

37. 0.256 0.256 ↑ 1.0 1 256

Aggregate (cost=8.15..8.16 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=256)

38. 0.000 0.000 ↓ 0.0 0 256

Index Scan using bankpaymenttransaction_mapping_idx on bankpaymenttransaction bpt_1 (cost=0.14..8.15 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=256)

  • Index Cond: (mapping_id = fi_eps.maturitypaymentmapping_id)
Planning time : 9.507 ms
Execution time : 8.737 ms