explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CRgF

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

Finalize GroupAggregate (cost=28,900.86..29,049.00 rows=1,069 width=248) (actual time=2,948.952..2,949.951 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=109080 read=20366, temp read=446 written=446
2. 0.000 2,998.267 ↑ 74.2 12 1

Gather Merge (cost=28,900.86..29,019.17 rows=890 width=248) (actual time=2,948.749..2,998.267 rows=12 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=335105 read=40237, temp read=1338 written=1338
3. 2.652 8,419.422 ↑ 111.2 4 3

Partial GroupAggregate (cost=27,900.84..27,916.41 rows=445 width=248) (actual time=2,805.785..2,806.474 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=335105 read=40237, temp read=1338 written=1338
4. 4.941 8,416.770 ↑ 1.3 343 3

Sort (cost=27,900.84..27,901.95 rows=445 width=228) (actual time=2,805.540..2,805.590 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: 77kB
  • Buffers: shared hit=335105 read=40237, temp read=1338 written=1338
5. 23.694 8,411.829 ↑ 1.3 343 3

Hash Join (cost=12,445.61..27,881.26 rows=445 width=228) (actual time=2,319.330..2,803.943 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=335073 read=40235, temp read=1338 written=1338
6. 42.743 8,386.947 ↑ 1.2 8,665 3

Nested Loop (cost=12,444.21..27,849.52 rows=10,705 width=128) (actual time=2,304.340..2,795.649 rows=8,665 loops=3)

  • Buffers: shared hit=335041 read=40230, temp read=1338 written=1338
7. 150.135 7,460.340 ↑ 1.2 8,665 3

Merge Join (cost=12,443.79..22,998.32 rows=10,705 width=128) (actual time=2,300.434..2,486.780 rows=8,665 loops=3)

  • Merge Cond: (orders.o_orderkey = lineitem.l_orderkey)
  • Buffers: shared hit=235110 read=36025, temp read=1338 written=1338
8. 356.382 356.382 ↑ 5.0 87,370 3

Parallel Index Scan using orders_pkey on orders (cost=0.42..40,395.37 rows=436,907 width=12) (actual time=0.677..118.794 rows=87,370 loops=3)

  • Buffers: shared hit=1242 read=5538
9. 455.217 6,953.823 ↓ 1.0 25,996 3

Sort (cost=12,443.36..12,507.59 rows=25,691 width=128) (actual time=2,299.696..2,317.941 rows=25,996 loops=3)

  • Sort Key: lineitem.l_orderkey
  • Sort Method: external sort Disk: 1784kB
  • Buffers: shared hit=233868 read=30487, temp read=1338 written=1338
10. 63.873 6,498.606 ↓ 1.0 25,996 3

Nested Loop (cost=1.83..10,561.63 rows=25,691 width=128) (actual time=0.768..2,166.202 rows=25,996 loops=3)

  • Buffers: shared hit=233854 read=30487
11. 23.511 54.780 ↓ 1.0 817 3

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

  • Hash Cond: (supplier.s_nationkey = n1.n_nationkey)
  • Buffers: shared hit=464 read=229
12. 30.999 30.999 ↑ 1.0 10,000 3

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

  • Buffers: shared hit=461 read=229
13. 0.075 0.270 ↑ 1.0 2 3

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

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

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

  • Filter: ((n_name = 'INDIA'::bpchar) OR (n_name = 'FRANCE'::bpchar))
  • Rows Removed by Filter: 23
  • Buffers: shared hit=3
15. 6,379.953 6,379.953 ↑ 1.0 32 2,451

Index Scan using idx_lineitem_suppkey on lineitem (cost=0.42..12.43 rows=32 width=32) (actual time=0.126..2.603 rows=32 loops=2,451)

  • Index Cond: (l_suppkey = supplier.s_suppkey)
  • Filter: ((l_shipdate >= '1995-01-01'::date) AND (l_shipdate <= '1996-12-31'::date))
  • Rows Removed by Filter: 73
  • Buffers: shared hit=233390 read=30258
16. 883.864 883.864 ↑ 1.0 1 25,996

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

  • Index Cond: (c_custkey = orders.o_custkey)
  • Buffers: shared hit=99931 read=4205
17. 0.084 1.188 ↑ 1.0 2 3

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

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

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

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