explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8EnM

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 62.942 ↑ 13.3 15 1

HashAggregate (cost=6,533.56..6,535.56 rows=200 width=296) (actual time=62.941..62.942 rows=15 loops=1)

  • Group Key: anon_1."anon_2_Product_id", anon_1."anon_2_Delivery_warehouseID
2. 0.001 62.933 ↑ 119.9 15 1

Subquery Scan on anon_1 (cost=5,600.30..6,524.57 rows=1,799 width=296) (actual time=62.824..62.933 rows=15 loops=1)

3. 4.467 62.932 ↑ 119.9 15 1

HashSetOp Except (cost=5,600.30..6,506.58 rows=1,799 width=300) (actual time=62.824..62.932 rows=15 loops=1)

4. 1.085 58.465 ↑ 1.6 15,873 1

Append (cost=5,600.30..6,376.91 rows=25,934 width=300) (actual time=49.664..58.465 rows=15,873 loops=1)

5. 0.900 55.152 ↑ 2.3 7,944 1

Subquery Scan on *SELECT* 1 (cost=5,600.30..6,095.03 rows=17,990 width=300) (actual time=49.663..55.152 rows=7,944 loops=1)

6. 2.764 54.252 ↑ 2.3 7,944 1

Unique (cost=5,600.30..5,735.23 rows=17,990 width=296) (actual time=49.662..54.252 rows=7,944 loops=1)

7. 32.380 51.488 ↑ 1.0 17,990 1

Sort (cost=5,600.30..5,645.28 rows=17,990 width=296) (actual time=49.662..51.488 rows=17,990 loops=1)

  • Sort Key: "Product".id, "Delivery"."warehouseID
  • Sort Method: quicksort Memory: 3115kB
8. 2.097 19.108 ↑ 1.0 17,990 1

Append (cost=694.48..1,868.37 rows=17,990 width=296) (actual time=5.245..19.108 rows=17,990 loops=1)

9. 1.000 8.421 ↑ 1.0 2,294 1

Hash Join (cost=694.48..832.51 rows=2,294 width=74) (actual time=5.245..8.421 rows=2,294 loops=1)

  • Hash Cond: ("DeliveryItem"."deliveryID" = "Delivery".id)
10. 1.527 6.907 ↑ 1.0 2,294 1

Hash Join (cost=632.96..739.44 rows=2,294 width=74) (actual time=4.725..6.907 rows=2,294 loops=1)

  • Hash Cond: ("DeliveryItem"."productID" = "Product".id)
11. 0.713 0.713 ↑ 1.0 2,294 1

Seq Scan on "DeliveryItem" (cost=0.00..74.94 rows=2,294 width=74) (actual time=0.010..0.713 rows=2,294 loops=1)

12. 2.680 4.667 ↑ 1.0 11,079 1

Hash (cost=494.47..494.47 rows=11,079 width=37) (actual time=4.667..4.667 rows=11,079 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 875kB
13. 1.987 1.987 ↑ 1.0 11,079 1

Index Only Scan using "Product_pkey" on "Product" (cost=0.29..494.47 rows=11,079 width=37) (actual time=0.039..1.987 rows=11,079 loops=1)

  • Heap Fetches: 74
14. 0.181 0.514 ↑ 1.0 675 1

Hash (cost=52.90..52.90 rows=690 width=74) (actual time=0.514..0.514 rows=675 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 78kB
15. 0.333 0.333 ↑ 1.0 675 1

Seq Scan on "Delivery" (cost=0.00..52.90 rows=690 width=74) (actual time=0.011..0.333 rows=675 loops=1)

16. 8.590 8.590 ↑ 1.0 15,696 1

Seq Scan on "Storage" (cost=0.00..855.96 rows=15,696 width=74) (actual time=0.009..8.590 rows=15,696 loops=1)

17. 0.966 2.228 ↑ 1.0 7,929 1

Subquery Scan on *SELECT* 2 (cost=0.00..281.88 rows=7,944 width=78) (actual time=0.037..2.228 rows=7,929 loops=1)

18. 1.262 1.262 ↑ 1.0 7,929 1

Seq Scan on product_distribution (cost=0.00..202.44 rows=7,944 width=74) (actual time=0.036..1.262 rows=7,929 loops=1)

Planning time : 12.497 ms
Execution time : 63.273 ms