explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xsBh

Settings
# exclusive inclusive rows x rows loops node
1. 0.346 9.340 ↑ 56.3 3 1

Sort (cost=953.91..954.34 rows=169 width=61) (actual time=9.340..9.340 rows=3 loops=1)

  • Sort Key: w.scrape_date DESC
  • Sort Method: quicksort Memory: 25kB
2.          

Initplan (forSort)

3. 0.002 0.040 ↑ 1.0 1 1

Result (cost=0.48..0.49 rows=1 width=32) (actual time=0.040..0.040 rows=1 loops=1)

4.          

Initplan (forResult)

5. 0.001 0.038 ↑ 1.0 1 1

Limit (cost=0.42..0.48 rows=1 width=5) (actual time=0.038..0.038 rows=1 loops=1)

6. 0.037 0.037 ↑ 222,435.0 1 1

Index Only Scan Backward using idx_product_price_price on product_price (cost=0.42..12,885.71 rows=222,435 width=5) (actual time=0.037..0.037 rows=1 loops=1)

  • Index Cond: (price IS NOT NULL)
  • Heap Fetches: 1
7. 0.006 8.954 ↑ 56.3 3 1

Nested Loop (cost=410.61..947.17 rows=169 width=61) (actual time=8.943..8.954 rows=3 loops=1)

  • Join Filter: (w.product_id = x.id)
8. 0.341 8.936 ↑ 56.3 3 1

Hash Join (cost=410.33..886.44 rows=169 width=40) (actual time=8.930..8.936 rows=3 loops=1)

  • Hash Cond: (u.brand_id = t.id)
9. 0.047 8.249 ↑ 56.3 3 1

Hash Join (cost=377.99..853.66 rows=169 width=30) (actual time=8.245..8.249 rows=3 loops=1)

  • Hash Cond: (w.product_id = u.product_id)
10. 0.007 0.078 ↑ 53.0 3 1

Bitmap Heap Scan on product_price w (cost=5.65..476.65 rows=159 width=22) (actual time=0.075..0.078 rows=3 loops=1)

  • Recheck Cond: (price = $1)
  • Heap Blocks: exact=3
11. 0.071 0.071 ↑ 53.0 3 1

Bitmap Index Scan on idx_product_price_price (cost=0.00..5.61 rows=159 width=0) (actual time=0.071..0.071 rows=3 loops=1)

  • Index Cond: (price = $1)
12. 7.157 8.124 ↑ 1.0 13,793 1

Hash (cost=199.93..199.93 rows=13,793 width=8) (actual time=8.124..8.124 rows=13,793 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 667kB
13. 0.967 0.967 ↑ 1.0 13,793 1

Seq Scan on product_brand u (cost=0.00..199.93 rows=13,793 width=8) (actual time=0.005..0.967 rows=13,793 loops=1)

14. 0.181 0.346 ↓ 1.0 1,135 1

Hash (cost=18.26..18.26 rows=1,126 width=18) (actual time=0.345..0.346 rows=1,135 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 74kB
15. 0.165 0.165 ↓ 1.0 1,135 1

Seq Scan on brand t (cost=0.00..18.26 rows=1,126 width=18) (actual time=0.017..0.165 rows=1,135 loops=1)

16. 0.012 0.012 ↑ 1.0 1 3

Index Scan using product_pkey on product x (cost=0.29..0.35 rows=1 width=37) (actual time=0.004..0.004 rows=1 loops=3)

  • Index Cond: (id = u.product_id)
Planning time : 1.369 ms