explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cgrO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 985.482 ↑ 267.2 4 1

Finalize GroupAggregate (cost=42,354.34..42,502.48 rows=1,069 width=248) (actual time=984.388..985.482 rows=4 loops=1)

  • Group Key: n1.n_name, n2.n_name, (date_part('year'::text, (lineitem.l_shipdate)::timestamp without time zone))
  • Buffers: shared hit=90824 read=6430
2. 0.000 1,033.829 ↑ 74.2 12 1

Gather Merge (cost=42,354.34..42,472.64 rows=890 width=248) (actual time=984.134..1,033.829 rows=12 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=215149 read=15031
3. 2.946 2,634.768 ↑ 111.2 4 3

Partial GroupAggregate (cost=41,354.32..41,369.89 rows=445 width=248) (actual time=877.500..878.256 rows=4 loops=3)

  • Group Key: n1.n_name, n2.n_name, (date_part('year'::text, (lineitem.l_shipdate)::timestamp without time zone))
  • Buffers: shared hit=215149 read=15031
4. 5.487 2,631.822 ↑ 1.3 343 3

Sort (cost=41,354.32..41,355.43 rows=445 width=228) (actual time=877.212..877.274 rows=343 loops=3)

  • Sort Key: n1.n_name, n2.n_name, (date_part('year'::text, (lineitem.l_shipdate)::timestamp without time zone))
  • Sort Method: quicksort Memory: 85kB
  • Buffers: shared hit=215149 read=15031
5. 30.987 2,626.335 ↑ 1.3 343 3

Hash Join (cost=374.34..41,334.74 rows=445 width=228) (actual time=20.742..875.445 rows=343 loops=3)

  • Hash Cond: (customer.c_nationkey = n2.n_nationkey)
  • Join Filter: (((n1.n_name = 'INDIA'::bpchar) AND (n2.n_name = 'FRANCE'::bpchar)) OR ((n1.n_name = 'FRANCE'::bpchar) AND (n2.n_name = 'INDIA'::bpchar)))
  • Rows Removed by Join Filter: 335
  • Buffers: shared hit=215115 read=15031
6. 56.633 2,594.187 ↑ 1.2 8,665 3

Nested Loop (cost=372.94..41,303.00 rows=10,705 width=128) (actual time=16.249..864.729 rows=8,665 loops=3)

  • Buffers: shared hit=215078 read=15031
7. 62.342 2,199.606 ↑ 1.2 8,665 3

Nested Loop (cost=372.52..36,451.80 rows=10,705 width=128) (actual time=16.157..733.202 rows=8,665 loops=3)

  • Buffers: shared hit=110942 read=15031
8. 174.636 1,799.316 ↑ 1.2 8,665 3

Hash Join (cost=372.10..28,761.53 rows=10,705 width=128) (actual time=16.011..599.772 rows=8,665 loops=3)

  • Hash Cond: (lineitem.l_suppkey = supplier.s_suppkey)
  • Buffers: shared hit=6890 read=15030
9. 1,577.715 1,577.715 ↑ 1.3 106,367 3

Parallel Seq Scan on lineitem (cost=0.00..27,780.60 rows=133,808 width=32) (actual time=0.253..525.905 rows=106,367 loops=3)

  • Filter: ((l_shipdate >= '1995-01-01'::date) AND (l_shipdate <= '1996-12-31'::date))
  • Rows Removed by Filter: 243158
  • Buffers: shared hit=6197 read=15030
10. 3.324 46.965 ↓ 1.0 817 3

Hash (cost=362.10..362.10 rows=800 width=108) (actual time=15.655..15.655 rows=817 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 58kB
  • Buffers: shared hit=693
11. 14.637 43.641 ↓ 1.0 817 3

Hash Join (cost=1.40..362.10 rows=800 width=108) (actual time=0.374..14.547 rows=817 loops=3)

  • Hash Cond: (supplier.s_nationkey = n1.n_nationkey)
  • Buffers: shared hit=693
12. 28.833 28.833 ↑ 1.0 10,000 3

Seq Scan on supplier (cost=0.00..330.00 rows=10,000 width=12) (actual time=0.279..9.611 rows=10,000 loops=3)

  • Buffers: shared hit=690
13. 0.063 0.171 ↑ 1.0 2 3

Hash (cost=1.38..1.38 rows=2 width=108) (actual time=0.057..0.057 rows=2 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
14. 0.108 0.108 ↑ 1.0 2 3

Seq Scan on nation n1 (cost=0.00..1.38 rows=2 width=108) (actual time=0.027..0.036 rows=2 loops=3)

  • Filter: ((n_name = 'INDIA'::bpchar) OR (n_name = 'FRANCE'::bpchar))
  • Rows Removed by Filter: 23
  • Buffers: shared hit=3
15. 337.948 337.948 ↑ 1.0 1 25,996

Index Scan using orders_pkey on orders (cost=0.42..0.72 rows=1 width=12) (actual time=0.013..0.013 rows=1 loops=25,996)

  • Index Cond: (o_orderkey = lineitem.l_orderkey)
  • Buffers: shared hit=104052 read=1
16. 337.948 337.948 ↑ 1.0 1 25,996

Index Scan using customer_pkey on customer (cost=0.42..0.45 rows=1 width=12) (actual time=0.013..0.013 rows=1 loops=25,996)

  • Index Cond: (c_custkey = orders.o_custkey)
  • Buffers: shared hit=104136
17. 0.072 1.161 ↑ 1.0 2 3

Hash (cost=1.38..1.38 rows=2 width=108) (actual time=0.387..0.387 rows=2 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
18. 1.089 1.089 ↑ 1.0 2 3

Seq Scan on nation n2 (cost=0.00..1.38 rows=2 width=108) (actual time=0.345..0.363 rows=2 loops=3)

  • Filter: ((n_name = 'FRANCE'::bpchar) OR (n_name = 'INDIA'::bpchar))
  • Rows Removed by Filter: 23
  • Buffers: shared hit=3