explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KbRY

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=114,259.19..114,259.20 rows=1 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Hash Join (cost=49,526.13..114,236.84 rows=8,937 width=3) (actual rows= loops=)

  • Hash Cond: (order_line.ol_i_id = item.i_id)
  • Join Filter: ((order_line.ol_quantity)::numeric < (avg(order_line_1.ol_quantity)))
3. 0.000 0.000 ↓ 0.0

Seq Scan on order_line (cost=0.00..57,987.54 rows=2,561,154 width=11) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash (cost=49,513.50..49,513.50 rows=1,010 width=36) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=49,244.99..49,503.40 rows=1,010 width=36) (actual rows= loops=)

  • Group Key: item.i_id
6. 0.000 0.000 ↓ 0.0

Gather Merge (cost=49,244.99..49,480.68 rows=2,020 width=36) (actual rows= loops=)

  • Workers Planned: 2
7. 0.000 0.000 ↓ 0.0

Sort (cost=48,244.97..48,247.49 rows=1,010 width=36) (actual rows= loops=)

  • Sort Key: item.i_id
8. 0.000 0.000 ↓ 0.0

Partial HashAggregate (cost=48,184.47..48,194.57 rows=1,010 width=36) (actual rows= loops=)

  • Group Key: item.i_id
9. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=2,281.72..48,130.58 rows=10,778 width=8) (actual rows= loops=)

  • Hash Cond: (order_line_1.ol_i_id = item.i_id)
10. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on order_line order_line_1 (cost=0.00..43,047.47 rows=1,067,148 width=8) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=2,274.29..2,274.29 rows=594 width=4) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on item (cost=0.00..2,274.29 rows=594 width=4) (actual rows= loops=)

  • Filter: (i_data ~~ 'b%'::text)