explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hcAI

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.702 ↑ 31.0 1 1

Sort (cost=152.13..152.21 rows=31 width=44) (actual time=0.702..0.702 rows=1 loops=1)

  • Sort Key: (sum(((quantity)::numeric * price))) DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=64
2. 0.006 0.702 ↑ 31.0 1 1

GroupAggregate (cost=150.46..151.36 rows=31 width=44) (actual time=0.700..0.702 rows=1 loops=1)

  • Group Key: product_id
  • Buffers: shared hit=64
3. 0.003 0.696 ↑ 34.0 1 1

Sort (cost=150.46..150.55 rows=34 width=40) (actual time=0.696..0.696 rows=1 loops=1)

  • Sort Key: product_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=64
4. 0.693 0.693 ↑ 34.0 1 1

Seq Scan on sale (cost=0.00..149.60 rows=34 width=40) (actual time=0.336..0.693 rows=1 loops=1)

  • Filter: (customer_id = $1)
  • Rows Removed by Filter: 9999
  • Buffers: shared hit=64
Planning time : 0.046 ms
Execution time : 0.717 ms