explain.depesz.com

PostgreSQL's explain analyze made readable

Result: idBv

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 3,373.711 ↑ 4.7 3 1

Unique (cost=315,383.48..315,383.58 rows=14 width=16) (actual time=3,373.708..3,373.711 rows=3 loops=1)

2. 0.005 3,373.707 ↑ 4.7 3 1

Sort (cost=315,383.48..315,383.51 rows=14 width=16) (actual time=3,373.706..3,373.707 rows=3 loops=1)

  • Sort Key: od_db.buyer_id, (count(si.*))
  • Sort Method: quicksort Memory: 25kB
3. 0.000 3,373.702 ↑ 4.7 3 1

Finalize GroupAggregate (cost=315,381.39..315,383.21 rows=14 width=16) (actual time=3,373.697..3,373.702 rows=3 loops=1)

  • Group Key: od_db.buyer_id
4. 14.595 3,385.959 ↑ 2.3 6 1

Gather Merge (cost=315,381.39..315,383.00 rows=14 width=16) (actual time=3,373.688..3,385.959 rows=6 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
5. 0.015 3,371.364 ↑ 4.7 3 2 / 2

Sort (cost=314,381.38..314,381.42 rows=14 width=16) (actual time=3,371.363..3,371.364 rows=3 loops=2)

  • Sort Key: od_db.buyer_id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
6. 47.419 3,371.349 ↑ 4.7 3 2 / 2

Partial HashAggregate (cost=314,380.97..314,381.11 rows=14 width=16) (actual time=3,371.347..3,371.349 rows=3 loops=2)

  • Group Key: od_db.buyer_id
7. 118.982 3,323.930 ↑ 1.2 128,400 2 / 2

Parallel Hash Join (cost=310,144.40..313,625.68 rows=151,058 width=306) (actual time=3,170.989..3,323.930 rows=128,400 loops=2)

  • Hash Cond: (ddsceps.id = ps_eps.id)
8. 34.943 34.943 ↑ 1.2 128,400 2 / 2

Parallel Seq Scan on ddsuppliercentricearlypaymentsettlement ddsceps (cost=0.00..2,899.58 rows=151,058 width=8) (actual time=0.007..34.943 rows=128,400 loops=2)

9. 92.878 3,170.005 ↓ 2.0 128,400 2 / 2

Parallel Hash (cost=309,341.90..309,341.90 rows=64,200 width=322) (actual time=3,170.004..3,170.005 rows=128,400 loops=2)

  • Buckets: 262,144 Batches: 1 Memory Usage: 86,528kB
10. 81.104 3,077.127 ↓ 2.0 128,400 2 / 2

Hash Left Join (cost=4,789.55..309,341.90 rows=64,200 width=322) (actual time=2,355.614..3,077.127 rows=128,400 loops=2)

  • Hash Cond: (si.originatordivision_id = od_db.id)
11. 185.045 2,995.992 ↓ 2.0 128,400 2 / 2

Nested Loop (cost=4,788.24..309,121.05 rows=64,200 width=322) (actual time=2,355.564..2,995.992 rows=128,400 loops=2)

12. 1,451.073 2,554.148 ↓ 2.0 128,400 2 / 2

Parallel Hash Join (cost=4,787.81..269,792.42 rows=64,200 width=24) (actual time=2,355.509..2,554.148 rows=128,400 loops=2)

  • Hash Cond: (ps_eps.id = ps_ddeps.id)
13. 1,007.453 1,007.453 ↓ 2.0 3,183,781 2 / 2

Parallel Seq Scan on earlypaymentsettlement ps_eps (cost=0.00..260,825.90 rows=1,591,890 width=16) (actual time=0.004..1,007.453 rows=3,183,781 loops=2)

14. 53.606 95.622 ↑ 1.2 128,400 2 / 2

Parallel Hash (cost=2,899.58..2,899.58 rows=151,058 width=8) (actual time=95.622..95.622 rows=128,400 loops=2)

  • Buckets: 262,144 Batches: 1 Memory Usage: 12,128kB
15. 42.016 42.016 ↑ 1.2 128,400 2 / 2

Parallel Seq Scan on ddearlypaymentsettlement ps_ddeps (cost=0.00..2,899.58 rows=151,058 width=8) (actual time=0.008..42.016 rows=128,400 loops=2)

16. 256.799 256.799 ↑ 1.0 1 256,799 / 2

Index Scan using supplierinvoice_pkey on supplierinvoice si (cost=0.43..0.61 rows=1 width=314) (actual time=0.002..0.002 rows=1 loops=256,799)

  • Index Cond: (id = ps_eps.invoice_id)
17. 0.009 0.031 ↑ 1.0 14 2 / 2

Hash (cost=1.14..1.14 rows=14 width=16) (actual time=0.030..0.031 rows=14 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
18. 0.022 0.022 ↑ 1.0 14 2 / 2

Seq Scan on divisionbase od_db (cost=0.00..1.14 rows=14 width=16) (actual time=0.016..0.022 rows=14 loops=2)

Planning time : 0.955 ms
Execution time : 3,386.358 ms