explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2rf8

Settings
# exclusive inclusive rows x rows loops node
1. 0.029 178.332 ↑ 762.0 3 1

Sort (cost=73,064.95..73,070.66 rows=2,286 width=24) (actual time=178.332..178.332 rows=3 loops=1)

  • Sort Key: (min(stock_quant.id))
  • Sort Method: quicksort Memory: 25kB
2. 0.069 178.303 ↑ 762.0 3 1

HashAggregate (cost=72,914.55..72,937.41 rows=2,286 width=24) (actual time=178.293..178.303 rows=3 loops=1)

  • Group Key: stock_quant.product_id
3. 9.790 178.234 ↑ 652.0 48 1

Hash Join (cost=2,410.42..72,601.57 rows=31,298 width=16) (actual time=89.197..178.234 rows=48 loops=1)

  • Hash Cond: (stock_quant.location_id = stock_quant__location_id.id)
4. 152.433 160.608 ↓ 1.0 72,726 1

Bitmap Heap Scan on stock_quant (cost=1,339.76..71,343.07 rows=71,543 width=20) (actual time=12.292..160.608 rows=72,726 loops=1)

  • Recheck Cond: (product_id = ANY ('{12744,13499,3315}'::integer[]))
  • Heap Blocks: exact=24,563
5. 8.175 8.175 ↓ 1.0 72,726 1

Bitmap Index Scan on stock_quant_product_id_index (cost=0.00..1,321.87 rows=71,543 width=0) (actual time=8.174..8.175 rows=72,726 loops=1)

  • Index Cond: (product_id = ANY ('{12744,13499,3315}'::integer[]))
6. 1.834 7.836 ↓ 1.1 10,513 1

Hash (cost=954.36..954.36 rows=9,304 width=4) (actual time=7.836..7.836 rows=10,513 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 498kB
7. 6.002 6.002 ↓ 1.1 10,513 1

Seq Scan on stock_location stock_quant__location_id (cost=0.00..954.36 rows=9,304 width=4) (actual time=0.015..6.002 rows=10,513 loops=1)

  • Filter: (((parent_left >= 14,757) AND (parent_left < 39430)) OR ((parent_left >= 135) AND (parent_left < 14752)))
  • Rows Removed by Filter: 10,755
Planning time : 17.360 ms
Execution time : 178.669 ms