explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U3f8 : donderdag

Settings
# exclusive inclusive rows x rows loops node
1. 1,017.739 1,017.739 ↓ 2.7 52 1

Sort (cost=2,744.11..2,744.15 rows=19 width=34) (actual time=1,017.585..1,017.739 rows=52 loops=1)

  • Sort Key: customers.city
  • Sort Method: quicksort Memory: 29kB
  • -> Nested Loop (cost=1514.37..2743.70 rows=19 width=34) (actual time=560.260..1017.226
  • -> Nested Loop (cost=1514.37..2734.89 rows=19 width=8) (actual time=560.209..1015.418
  • -> Hash Join (cost=1514.37..2729.37 rows=19 width=4) (actual
  • Hash Cond: (public.orderlines.prod_id = most_sold.prod_id)
  • -> Seq Scan on orderlines (cost=0.00..988.50 rows=60350 width=8) (actual
  • -> Hash (cost=1514.33..1514.33 rows=3 width=4) (actual
  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • -> Limit (cost=1514.29..1514.30 rows=3 width=4) (actual
  • Sort Key: (count(*))
  • Sort Method: top-N heapsort Memory: 25kB
  • -> HashAggregate (cost=1290.25..1387.98 rows=9773
  • -> Seq Scan on orderlines (cost=0.00..988.50
  • Index Cond: (orderid = public.orderlines.orderid)
  • Index Cond: (customerid = orders.customerid)
2. 0.000 0.000 ↓ 0.0

Subquery Scan on most_sold (cost=1,514.29..1,514.33 rows=3 width=4) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=1,514.29..1,538.73 rows=9,773 width=4) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using orders_pkey on orders (cost=0.00..0.28 rows=1 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Scan using customers_pkey on customers (cost=0.00..0.45 rows=1 width=30) (actual rows= loops=)