explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Left

Settings
# exclusive inclusive rows x rows loops node
1. 0.590 8.633 ↓ 4.6 256 1

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

2. 0.305 7.787 ↓ 4.6 256 1

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

3. 0.393 7.482 ↓ 4.6 256 1

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

4. 0.185 6.833 ↓ 4.6 256 1

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

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

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

6. 0.208 5.796 ↓ 4.6 256 1

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

7. 0.176 5.076 ↓ 4.6 256 1

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

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

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

9. 0.277 3.049 ↓ 4.6 256 1

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

10. 0.041 2.568 ↓ 10.2 51 1

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

11. 0.118 2.374 ↓ 10.2 51 1

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

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

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

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

Nested Loop (cost=0.86..1,525.61 rows=5 width=56) (actual time=0.106..1.887 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.105 1.438 ↓ 9.1 172 1

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

15. 0.249 0.817 ↓ 1.2 172 1

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

16. 0.052 0.052 ↑ 1.0 172 1

Seq Scan on nettingbundle nb (cost=0.00..3.72 rows=172 width=16) (actual time=0.008..0.052 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.162 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.010 0.010 ↑ 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.006..0.010 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.091 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.011 0.011 ↑ 1.0 14 1

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

24. 0.153 0.153 ↑ 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.003..0.003 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.524 1.559 ↑ 1.0 1,650 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 119kB
28. 1.035 1.035 ↑ 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.003..1.035 rows=1,650 loops=1)

29. 0.512 0.512 ↑ 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.002..0.002 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.003 0.008 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.008..0.008 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.535 ms
Execution time : 8.939 ms