explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yp8

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

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

  • Group Key: n1.n_name, n2.n_name, (date_part('year'::text, (lineitem.l_shipdate)::timestamp without time zone))
2. 0.000 1,628.026 ↑ 74.2 12 1

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

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.331 4,201.758 ↑ 111.2 4 3

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

  • Group Key: n1.n_name, n2.n_name, (date_part('year'::text, (lineitem.l_shipdate)::timestamp without time zone))
4. 6.510 4,199.427 ↑ 1.3 343 3

Sort (cost=41,354.32..41,355.43 rows=445 width=228) (actual time=1,399.768..1,399.809 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: 75kB
5. 22.071 4,192.917 ↑ 1.3 343 3

Hash Join (cost=374.34..41,334.74 rows=445 width=228) (actual time=22.227..1,397.639 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
6. 58.319 4,169.628 ↑ 1.2 8,665 3

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

7. 56.667 3,695.373 ↑ 1.2 8,665 3

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

8. 165.540 3,326.754 ↑ 1.2 8,665 3

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

  • Hash Cond: (lineitem.l_suppkey = supplier.s_suppkey)
9. 3,122.604 3,122.604 ↑ 1.3 106,367 3

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

  • Filter: ((l_shipdate >= '1995-01-01'::date) AND (l_shipdate <= '1996-12-31'::date))
  • Rows Removed by Filter: 243158
10. 2.160 38.610 ↓ 1.0 817 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 58kB
11. 14.679 36.450 ↓ 1.0 817 3

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

  • Hash Cond: (supplier.s_nationkey = n1.n_nationkey)
12. 21.555 21.555 ↑ 1.0 10,000 3

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

13. 0.066 0.216 ↑ 1.0 2 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.150 0.150 ↑ 1.0 2 3

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

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

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

  • Index Cond: (o_orderkey = lineitem.l_orderkey)
16. 415.936 415.936 ↑ 1.0 1 25,996

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

  • Index Cond: (c_custkey = orders.o_custkey)
17. 0.072 1.218 ↑ 1.0 2 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 1.146 1.146 ↑ 1.0 2 3

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

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