explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dzo

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

Finalize GroupAggregate (cost=42,354.34..42,502.48 rows=1,069 width=248) (actual time=1,089.925..1,090.556 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=89501 read=6376
2. 0.000 1,116.827 ↑ 74.2 12 1

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

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=215146 read=15034
3. 2.550 2,962.230 ↑ 111.2 4 3

Partial GroupAggregate (cost=41,354.32..41,369.89 rows=445 width=248) (actual time=986.698..987.410 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=215146 read=15034
4. 5.292 2,959.680 ↑ 1.3 343 3

Sort (cost=41,354.32..41,355.43 rows=445 width=228) (actual time=986.516..986.560 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: 92kB
  • Buffers: shared hit=215146 read=15034
5. 23.043 2,954.388 ↑ 1.3 343 3

Hash Join (cost=374.34..41,334.74 rows=445 width=228) (actual time=12.533..984.796 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=215112 read=15034
6. 41.619 2,930.265 ↑ 1.2 8,665 3

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

  • Buffers: shared hit=215075 read=15034
7. 67.622 2,498.706 ↑ 1.2 8,665 3

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

  • Buffers: shared hit=110939 read=15034
8. 169.470 2,093.136 ↑ 1.2 8,665 3

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

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

Parallel Seq Scan on lineitem (cost=0.00..27,780.60 rows=133,808 width=32) (actual time=0.211..632.729 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=6196 read=15031
10. 1.311 25.479 ↓ 1.0 817 3

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

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

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

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

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

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

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

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

Seq Scan on nation n1 (cost=0.00..1.38 rows=2 width=108) (actual time=0.023..0.032 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=104050 read=3
16. 389.940 389.940 ↑ 1.0 1 25,996

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

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

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

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

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

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