explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BBcj

Settings
# exclusive inclusive rows x rows loops node
1. 36.022 658.647 ↓ 0.0 0 1

SetOp Except (cost=16,269.18..16,634.67 rows=33,497 width=300) (actual time=658.647..658.647 rows=0 loops=1)

2. 401.682 622.625 ↓ 2.5 119,705 1

Sort (cost=16,269.18..16,391.01 rows=48,732 width=300) (actual time=503.982..622.625 rows=119,705 loops=1)

  • Sort Key: "*SELECT* 1".id, "*SELECT* 1"."warehouseID
  • Sort Method: external merge Disk: 10,512kB
3. 44.954 220.943 ↓ 2.5 119,705 1

Append (cost=3,421.82..5,642.77 rows=48,732 width=300) (actual time=58.745..220.943 rows=119,705 loops=1)

4. 43.018 165.191 ↓ 3.1 104,284 1

Subquery Scan on *SELECT* 1 (cost=3,421.82..5,091.07 rows=33,497 width=78) (actual time=58.744..165.191 rows=104,284 loops=1)

5. 43.737 122.173 ↓ 3.1 104,284 1

Hash Join (cost=3,421.82..4,756.10 rows=33,497 width=74) (actual time=58.742..122.173 rows=104,284 loops=1)

  • Hash Cond: (di."productID" = p.id)
6. 11.809 22.453 ↓ 1.0 18,656 1

Hash Join (cost=227.28..1,133.31 rows=18,654 width=74) (actual time=2.632..22.453 rows=18,656 loops=1)

  • Hash Cond: (di."deliveryID" = d.id)
7. 8.052 8.052 ↓ 1.0 18,656 1

Seq Scan on "DeliveryItem" di (cost=0.00..649.54 rows=18,654 width=74) (actual time=0.004..8.052 rows=18,656 loops=1)

8. 1.233 2.592 ↑ 1.0 3,246 1

Hash (cost=186.57..186.57 rows=3,257 width=74) (actual time=2.592..2.592 rows=3,246 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 369kB
9. 1.359 1.359 ↑ 1.0 3,246 1

Seq Scan on "Delivery" d (cost=0.00..186.57 rows=3,257 width=74) (actual time=0.002..1.359 rows=3,246 loops=1)

10. 12.017 55.983 ↑ 1.0 31,028 1

Hash (cost=2,806.69..2,806.69 rows=31,028 width=74) (actual time=55.983..55.983 rows=31,028 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 3,468kB
11. 19.266 43.966 ↑ 1.0 31,028 1

Hash Join (cost=954.78..2,806.69 rows=31,028 width=74) (actual time=11.997..43.966 rows=31,028 loops=1)

  • Hash Cond: (s."productID" = p.id)
12. 12.830 12.830 ↑ 1.0 31,028 1

Seq Scan on "Storage" s (cost=0.00..1,425.28 rows=31,028 width=37) (actual time=0.003..12.830 rows=31,028 loops=1)

13. 6.222 11.870 ↓ 1.0 17,363 1

Hash (cost=738.79..738.79 rows=17,279 width=37) (actual time=11.870..11.870 rows=17,363 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,426kB
14. 5.648 5.648 ↓ 1.0 17,363 1

Seq Scan on "Product" p (cost=0.00..738.79 rows=17,279 width=37) (actual time=0.002..5.648 rows=17,363 loops=1)

15. 6.192 10.798 ↓ 1.0 15,421 1

Subquery Scan on *SELECT* 2 (cost=0.00..551.70 rows=15,235 width=78) (actual time=0.009..10.798 rows=15,421 loops=1)

16. 4.606 4.606 ↓ 1.0 15,421 1

Seq Scan on product_distribution pd (cost=0.00..399.35 rows=15,235 width=74) (actual time=0.008..4.606 rows=15,421 loops=1)

Planning time : 1.263 ms
Execution time : 660.865 ms