explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fE27

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 21,858.650 ↑ 9.0 1 1

Nested Loop Left Join (cost=1.02..62,460.46 rows=9 width=340) (actual time=4,133.656..21,858.650 rows=1 loops=1)

2. 0.005 21,858.611 ↑ 6.0 1 1

Nested Loop (cost=1.02..62,456.50 rows=6 width=340) (actual time=4,133.618..21,858.611 rows=1 loops=1)

  • Join Filter: ((ba_prinot_m.pncoduff)::text = (ba_tmpuniope.uocoduop)::text)
3. 0.007 21,858.604 ↑ 1.0 1 1

Nested Loop (cost=1.02..62,421.08 rows=1 width=351) (actual time=4,133.613..21,858.604 rows=1 loops=1)

  • Join Filter: ((ba_partite.ptserial)::text = (ba_prinot_m.pnserial)::text)
4. 0.012 21,858.580 ↑ 1.0 1 1

Nested Loop (cost=1.02..62,420.57 rows=1 width=342) (actual time=4,133.589..21,858.580 rows=1 loops=1)

  • Join Filter: ((ba_prinot.pncodbun)::text = (ba_tmpsalbun.bucodbun)::text)
5. 0.345 21,858.566 ↑ 1.0 1 1

Nested Loop (cost=1.02..62,385.14 rows=1 width=342) (actual time=4,133.576..21,858.566 rows=1 loops=1)

  • Join Filter: ((ba_prinot.pncaupar)::text = (ba_caupar.cccodcau)::text)
  • Rows Removed by Join Filter: 26
6. 0.074 0.074 ↓ 27.0 27 1

Seq Scan on ba_caupar (cost=0.00..1.34 rows=1 width=38) (actual time=0.007..0.074 rows=27 loops=1)

  • Filter: (ccsalval = 0)
7. 0.324 21,858.147 ↑ 20.0 1 27

Nested Loop (cost=1.02..62,383.56 rows=20 width=342) (actual time=22.370..809.561 rows=1 loops=27)

8. 3,278.526 21,856.986 ↑ 11.0 1 27

Hash Join (cost=1.02..62,371.48 rows=11 width=310) (actual time=22.329..809.518 rows=1 loops=27)

  • Hash Cond: (((ba_partite.pttipsot)::bpchar = _clienti.tipo) AND ((ba_partite.ptcodsot)::bpchar = _clienti.codice))
9. 18,578.457 18,578.457 ↓ 1.0 992,753 27

Seq Scan on ba_partite002 ba_partite (cost=0.00..54,927.94 rows=992,320 width=310) (actual time=0.019..688.091 rows=992,753 loops=27)

  • Filter: (((pttipsot)::text = 'CLI'::text) AND ((ptcodval)::text = 'EUR'::text) AND (ptflrite = 0) AND (ptsplpay = 0))
  • Rows Removed by Filter: 65079
10. 0.001 0.003 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=80) (actual time=0.003..0.003 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
11. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on _clienti (cost=0.00..1.01 rows=1 width=80) (actual time=0.002..0.002 rows=1 loops=1)

12. 0.837 0.837 ↑ 1.0 1 27

Index Scan using pk_ba_prinot002 on ba_prinot002 ba_prinot (cost=0.00..1.09 rows=1 width=36) (actual time=0.030..0.031 rows=1 loops=27)

  • Index Cond: (((pnserial)::text = (ba_partite.ptserial)::text) AND (cprownum = ba_partite.ptnumrow))
13. 0.002 0.002 ↑ 1,130.0 1 1

Seq Scan on cptmp_nmaizxsawz ba_tmpsalbun (cost=0.00..21.30 rows=1,130 width=38) (actual time=0.002..0.002 rows=1 loops=1)

14. 0.017 0.017 ↑ 1.0 1 1

Index Scan using pk_ba_prinot_m002 on ba_prinot_m002 ba_prinot_m (cost=0.00..0.49 rows=1 width=34) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: ((pnserial)::text = (ba_prinot.pnserial)::text)
15. 0.002 0.002 ↑ 1,130.0 1 1

Seq Scan on cptmp_oclkybsoow ba_tmpuniope (cost=0.00..21.30 rows=1,130 width=38) (actual time=0.001..0.002 rows=1 loops=1)

16. 0.018 0.018 ↑ 1.0 1 1

Index Scan using ba_partite0025 on ba_partite002 ba_partite1 (cost=0.00..0.64 rows=1 width=20) (actual time=0.018..0.018 rows=1 loops=1)

  • Index Cond: (((ba_partite.ptkeypar)::text = (ptkeypar)::text) AND (ba_partite.ptkeynum = ptkeynum))
  • Filter: ((ptaggpar = 1) OR (ptaggpar = 3))