explain.depesz.com

A tool for finding a real cause for slow queries.

Result: XBzw

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.014 36.397 ↑ 9.0 9 1

Sort (cost=1,903.07..1,903.27 rows=81 width=22) (actual time=36.397..36.397 rows=9 loops=1)

  • Sort Key: (sum(order_item.price))
  • Sort Method: quicksort Memory: 25kB
2. 13.123 36.383 ↑ 9.0 9 1

HashAggregate (cost=1,899.69..1,900.50 rows=81 width=22) (actual time=36.380..36.383 rows=9 loops=1)

3. 5.090 23.260 ↑ 1.1 18,377 1

Hash Join (cost=216.23..1,704.76 rows=19,493 width=22) (actual time=2.315..23.260 rows=18,377 loops=1)

  • Hash Cond: (order_item.product_id = products.id)
4. 7.553 18.107 ↑ 1.1 18,377 1

Hash Join (cost=211.64..1,432.14 rows=19,493 width=10) (actual time=2.246..18.107 rows=18,377 loops=1)

  • Hash Cond: (order_item.order_id = "order".id)
5. 8.317 8.317 ↑ 1.0 39,190 1

Seq Scan on order_item (cost=0.00..731.02 rows=39,273 width=14) (actual time=0.004..8.317 rows=39,190 loops=1)

  • Filter: (NOT canceled)
6. 0.623 2.237 ↓ 1.0 3,830 1

Hash (cost=164.05..164.05 rows=3,807 width=4) (actual time=2.237..2.237 rows=3,830 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 135kB
7. 1.614 1.614 ↓ 1.0 3,830 1

Seq Scan on "order" (cost=0.00..164.05 rows=3,807 width=4) (actual time=0.485..1.614 rows=3,830 loops=1)

  • Filter: ((time_placed > '2011-01-01 00:00:00+02'::timestamp with time zone) AND (time_placed < '2012-01-01 00:00:00+02'::timestamp with time zone))
8. 0.018 0.063 ↑ 1.0 66 1

Hash (cost=3.77..3.77 rows=66 width=20) (actual time=0.063..0.063 rows=66 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
9. 0.030 0.045 ↑ 1.0 66 1

Hash Join (cost=1.20..3.77 rows=66 width=20) (actual time=0.017..0.045 rows=66 loops=1)

  • Hash Cond: (products.category_id = categories.id)
10. 0.008 0.008 ↑ 1.0 66 1

Seq Scan on products (cost=0.00..1.66 rows=66 width=8) (actual time=0.004..0.008 rows=66 loops=1)

11. 0.003 0.007 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=16) (actual time=0.007..0.007 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
12. 0.004 0.004 ↑ 1.0 9 1

Seq Scan on categories (cost=0.00..1.09 rows=9 width=16) (actual time=0.001..0.004 rows=9 loops=1)