explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y5JeO

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

Finalize GroupAggregate (cost=42,354.34..42,502.48 rows=1,069 width=248) (actual time=1,391.344..1,392.396 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=92301 read=7752
2. 0.000 1,427.741 ↑ 74.2 12 1

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

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=212906 read=17274
3. 2.313 3,507.072 ↑ 111.2 4 3

Partial GroupAggregate (cost=41,354.32..41,369.89 rows=445 width=248) (actual time=1,168.395..1,169.024 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=212906 read=17274
4. 4.446 3,504.759 ↑ 1.3 343 3

Sort (cost=41,354.32..41,355.43 rows=445 width=228) (actual time=1,168.207..1,168.253 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: 90kB
  • Buffers: shared hit=212906 read=17274
5. 24.144 3,500.313 ↑ 1.3 343 3

Hash Join (cost=374.34..41,334.74 rows=445 width=228) (actual time=42.789..1,166.771 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=212874 read=17272
6. 43.959 3,474.969 ↑ 1.2 8,665 3

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

  • Buffers: shared hit=212841 read=17268
7. 68.060 3,119.058 ↑ 1.2 8,665 3

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

  • Buffers: shared hit=108753 read=17220
8. 154.683 2,557.074 ↑ 1.2 8,665 3

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

  • Hash Cond: (lineitem.l_suppkey = supplier.s_suppkey)
  • Buffers: shared hit=6883 read=15037
9. 2,366.523 2,366.523 ↑ 1.3 106,367 3

Parallel Seq Scan on lineitem (cost=0.00..27,780.60 rows=133,808 width=32) (actual time=0.194..788.841 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=6190 read=15037
10. 1.860 35.868 ↓ 1.0 817 3

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

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

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

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

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

  • Buffers: shared hit=690
13. 0.060 0.192 ↑ 1.0 2 3

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

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

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

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

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

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

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

  • Index Cond: (c_custkey = orders.o_custkey)
  • Buffers: shared hit=104088 read=48
17. 0.081 1.200 ↑ 1.0 2 3

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

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

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

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