explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EgmB

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

Finalize GroupAggregate (cost=28,900.86..29,049.00 rows=1,069 width=248) (actual time=4,036.014..4,037.394 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 4,089.810 ↑ 74.2 12 1

Gather Merge (cost=28,900.86..29,019.17 rows=890 width=248) (actual time=4,035.800..4,089.810 rows=12 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 3.069 11,420.520 ↑ 111.2 4 3

Partial GroupAggregate (cost=27,900.84..27,916.41 rows=445 width=248) (actual time=3,806.027..3,806.840 rows=4 loops=3)

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

Sort (cost=27,900.84..27,901.95 rows=445 width=228) (actual time=3,805.763..3,805.817 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: 71kB
5. 26.604 11,410.146 ↑ 1.3 343 3

Hash Join (cost=12,445.61..27,881.26 rows=445 width=228) (actual time=3,287.054..3,803.382 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. 54.485 11,379.135 ↑ 1.2 8,665 3

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

7. 169.095 10,518.774 ↑ 1.2 8,665 3

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

  • Merge Cond: (orders.o_orderkey = lineitem.l_orderkey)
8. 477.804 477.804 ↑ 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=12.893..159.268 rows=87,370 loops=3)

9. 594.291 9,871.875 ↓ 1.0 25,996 3

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

  • Sort Key: lineitem.l_orderkey
  • Sort Method: external sort Disk: 1784kB
10. 64.056 9,277.584 ↓ 1.0 25,996 3

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

11. 24.957 191.397 ↓ 1.0 817 3

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

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

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

13. 0.075 0.222 ↑ 1.0 2 3

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

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

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

  • Filter: ((n_name = 'INDIA'::bpchar) OR (n_name = 'FRANCE'::bpchar))
  • Rows Removed by Filter: 23
15. 9,022.131 9,022.131 ↑ 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.155..3.681 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
16. 805.876 805.876 ↑ 1.0 1 25,996

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

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

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

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

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

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