explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MQv3 : Optimization for: plan #RGfV

Settings

Optimization path:

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

Finalize GroupAggregate (cost=72,735.61..72,979.96 rows=1,803 width=16) (actual rows= loops=)

  • Group Key: (date_part('year'::text, (orders.o_orderdate)::timestamp without time zone))
2. 0.000 0.000 ↓ 0.0

Gather Merge (cost=72,735.61..72,937.15 rows=1,502 width=24) (actual rows= loops=)

  • Workers Planned: 2
3. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=71,735.59..71,763.75 rows=751 width=24) (actual rows= loops=)

  • Group Key: (date_part('year'::text, (orders.o_orderdate)::timestamp without time zone))
4. 0.000 0.000 ↓ 0.0

Sort (cost=71,735.59..71,737.47 rows=751 width=42) (actual rows= loops=)

  • Sort Key: (date_part('year'::text, (orders.o_orderdate)::timestamp without time zone))
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=449.77..71,699.72 rows=751 width=42) (actual rows= loops=)

  • Hash Cond: (supplier.s_nationkey = n2.n_nationkey)
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=448.21..71,692.10 rows=751 width=16) (actual rows= loops=)

  • Hash Cond: (customer.c_nationkey = n1.n_nationkey)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=445.70..71,667.99 rows=3,757 width=20) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=445.28..69,896.17 rows=3,757 width=20) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Join (cost=444.85..64,157.52 rows=12,186 width=16) (actual rows= loops=)

  • Hash Cond: (lineitem.l_suppkey = supplier.s_suppkey)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..63,673.40 rows=15,278 width=16) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Parallel Index Scan using pk_part on part (cost=0.42..8,302.09 rows=554 width=4) (actual rows= loops=)

  • Filter: ((p_type)::text = 'PROMO ANODIZED BRASS'::text)
12. 0.000 0.000 ↓ 0.0

Index Scan using lineitem_l_partkey_l_quantity_l_shipmode_idx on lineitem (cost=0.43..99.67 rows=28 width=20) (actual rows= loops=)

  • Index Cond: (l_partkey = part.p_partkey)
13. 0.000 0.000 ↓ 0.0

Hash (cost=319.00..319.00 rows=10,000 width=8) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on supplier (cost=0.00..319.00 rows=10,000 width=8) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using orders_o_orderkey_o_orderdate_idx on orders (cost=0.43..0.47 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((o_orderkey = lineitem.l_orderkey) AND (o_orderdate >= '1995-01-01'::date) AND (o_orderdate <= '1996-12-31'::date))
16. 0.000 0.000 ↓ 0.0

Index Scan using pk_customer on customer (cost=0.42..0.47 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (c_custkey = orders.o_custkey)
17. 0.000 0.000 ↓ 0.0

Hash (cost=2.45..2.45 rows=5 width=4) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.07..2.45 rows=5 width=4) (actual rows= loops=)

  • Hash Cond: (n1.n_regionkey = region.r_regionkey)
19. 0.000 0.000 ↓ 0.0

Seq Scan on nation n1 (cost=0.00..1.25 rows=25 width=8) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash (cost=1.06..1.06 rows=1 width=4) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on region (cost=0.00..1.06 rows=1 width=4) (actual rows= loops=)

  • Filter: (r_name = 'AFRICA'::bpchar)
22. 0.000 0.000 ↓ 0.0

Hash (cost=1.25..1.25 rows=25 width=30) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on nation n2 (cost=0.00..1.25 rows=25 width=30) (actual rows= loops=)