explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q7cO

Settings
# exclusive inclusive rows x rows loops node
1. 66.566 67.050 ↓ 1.1 30 1

Result (cost=7.34..21.17 rows=27 width=48) (actual time=7.106..67.050 rows=30 loops=1)

2.          

Initplan (forResult)

3. 0.058 0.190 ↑ 1.0 1 1

Aggregate (cost=3.72..3.73 rows=1 width=32) (actual time=0.190..0.190 rows=1 loops=1)

4. 0.016 0.132 ↑ 2.0 5 1

Subquery Scan on r (cost=3.57..3.69 rows=10 width=52) (actual time=0.126..0.132 rows=5 loops=1)

5. 0.030 0.116 ↑ 2.0 5 1

Sort (cost=3.57..3.59 rows=10 width=38) (actual time=0.115..0.116 rows=5 loops=1)

  • Sort Key: f.def DESC, f.carrier_id, f.id
  • Sort Method: quicksort Memory: 25kB
6. 0.031 0.086 ↑ 2.0 5 1

Hash Join (cost=1.16..3.40 rows=10 width=38) (actual time=0.074..0.086 rows=5 loops=1)

  • Hash Cond: (f.estimate_id = e.id)
7. 0.027 0.027 ↑ 2.0 5 1

Seq Scan on fee f (cost=0.00..2.10 rows=10 width=38) (actual time=0.021..0.027 rows=5 loops=1)

8. 0.010 0.028 ↓ 1.1 8 1

Hash (cost=1.07..1.07 rows=7 width=8) (actual time=0.028..0.028 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.018 0.018 ↓ 1.1 8 1

Seq Scan on estimate e (cost=0.00..1.07 rows=7 width=8) (actual time=0.013..0.018 rows=8 loops=1)

10. 0.051 0.294 ↓ 1.1 30 1

Sort (cost=3.60..3.67 rows=27 width=40) (actual time=0.291..0.294 rows=30 loops=1)

  • Sort Key: s.product_variant_id
  • Sort Method: quicksort Memory: 55kB
11. 0.243 0.243 ↓ 1.1 30 1

Index Scan using inventory_stock_idx01 on stock s (cost=0.29..2.96 rows=27 width=40) (actual time=0.221..0.243 rows=30 loops=1)

  • Index Cond: (product_id = 49974)