explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jDtq : R2

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 9.105 1,326.607 ↑ 21.3 15,109 1

Sort (cost=230,926.79..231,730.59 rows=321,518 width=44) (actual time=1,325.098..1,326.607 rows=15,109 loops=1)

  • Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC, orders.o_orderdate
  • Sort Method: quicksort Memory: 1565kB
2. 20.877 1,317.502 ↑ 21.3 15,109 1

Finalize GroupAggregate (cost=149,312.57..191,625.67 rows=321,518 width=44) (actual time=1,273.796..1,317.502 rows=15,109 loops=1)

  • Group Key: lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority
3. 0.000 1,296.625 ↑ 17.7 15,109 1

Gather Merge (cost=149,312.57..184,257.55 rows=267,932 width=44) (actual time=1,273.781..1,296.625 rows=15,109 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 43.008 3,717.201 ↑ 26.6 5,036 3

Partial GroupAggregate (cost=148,312.54..152,331.52 rows=133,966 width=44) (actual time=1,223.864..1,239.067 rows=5,036 loops=3)

  • Group Key: lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority
5. 30.999 3,674.193 ↑ 8.9 15,012 3

Sort (cost=148,312.54..148,647.46 rows=133,966 width=24) (actual time=1,223.831..1,224.731 rows=15,012 loops=3)

  • Sort Key: lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority
  • Sort Method: quicksort Memory: 1586kB
6. 29.517 3,643.194 ↑ 8.9 15,012 3

Nested Loop (cost=5,828.49..134,156.83 rows=133,966 width=24) (actual time=93.709..1,214.398 rows=15,012 loops=3)

7. 284.556 1,268.445 ↑ 1.2 48,859 3

Hash Join (cost=5,828.06..40,551.63 rows=61,025 width=12) (actual time=93.114..422.815 rows=48,859 loops=3)

  • Hash Cond: (orders.o_custkey = customer.c_custkey)
8. 705.588 705.588 ↑ 1.3 245,722 3

Parallel Seq Scan on orders (cost=0.00..33,907.50 rows=310,875 width=16) (actual time=0.127..235.196 rows=245,722 loops=3)

  • Filter: (o_orderdate < '1995-03-31'::date)
  • Rows Removed by Filter: 254278
9. 29.886 278.301 ↓ 1.0 29,752 3

Hash (cost=5,460.00..5,460.00 rows=29,445 width=4) (actual time=92.767..92.767 rows=29,752 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 1302kB
10. 248.415 248.415 ↓ 1.0 29,752 3

Seq Scan on customer (cost=0.00..5,460.00 rows=29,445 width=4) (actual time=0.150..82.805 rows=29,752 loops=3)

  • Filter: (c_mktsegment = 'AUTOMOBILE'::bpchar)
  • Rows Removed by Filter: 120248
11. 2,345.232 2,345.232 ↓ 0.0 0 146,577

Index Scan using pklineitem on lineitem (cost=0.43..1.44 rows=9 width=16) (actual time=0.015..0.016 rows=0 loops=146,577)

  • Index Cond: (l_orderkey = orders.o_orderkey)
  • Filter: (l_shipdate > '1995-03-01'::date)
  • Rows Removed by Filter: 4