explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FfXd

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.025 ↑ 44.0 1 1

Sort (cost=70.67..70.78 rows=44 width=44) (actual time=0.025..0.025 rows=1 loops=1)

  • Sort Key: (sum(((quantity)::numeric * price))) DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
2. 0.007 0.016 ↑ 44.0 1 1

HashAggregate (cost=68.92..69.47 rows=44 width=44) (actual time=0.015..0.016 rows=1 loops=1)

  • Group Key: product_id
  • Buffers: shared hit=3
3. 0.000 0.009 ↑ 50.0 1 1

Bitmap Heap Scan on sale (cost=4.67..68.30 rows=50 width=40) (actual time=0.009..0.009 rows=1 loops=1)

  • Recheck Cond: (customer_id = $1)
  • Heap Blocks: exact=1
  • Buffers: shared hit=3
4. 0.009 0.009 ↑ 50.0 1 1

Bitmap Index Scan on sale_customer_id (cost=0.00..4.66 rows=50 width=0) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: (customer_id = $1)
  • Buffers: shared hit=2