explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dlru

Settings
# exclusive inclusive rows x rows loops node
1. 17.512 1,648.402 ↑ 1.0 20 1

Limit (cost=403,632.46..403,632.51 rows=20 width=201) (actual time=1,630.89..1,648.402 rows=20 loops=1)

2. 23.676 1,630.890 ↑ 5,732.4 20 1

Sort (cost=403,632.46..403,919.08 rows=114,647 width=201) (actual time=1,630.889..1,630.89 rows=20 loops=1)

  • Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
  • Sort Method: top-N heapsort Memory: 34kB
3. 50.119 1,607.214 ↑ 1.5 74,259 1

GroupAggregate (cost=384,060.52..400,581.75 rows=114,647 width=201) (actual time=1,455.309..1,607.214 rows=74,259 loops=1)

  • Group Key: customer.c_custkey, customer.c_name, customer.c_acctbal, customer.c_phone, nation.n_name, customer.c_address, customer.c_comment
4. 6.616 1,557.095 ↑ 1.3 74,259 1

Gather Merge (cost=384,060.52..396,999.01 rows=95,540 width=201) (actual time=1,455.287..1,557.095 rows=74,259 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 80.362 1,550.479 ↑ 1.9 24,753 3 / 3

GroupAggregate (cost=383,060.5..384,971.3 rows=47,770 width=201) (actual time=1,452.185..1,550.479 rows=24,753 loops=3)

  • Group Key: customer.c_custkey, customer.c_name, customer.c_acctbal, customer.c_phone, nation.n_name, customer.c_address, customer.c_comment
6. 152.650 1,470.117 ↓ 1.6 74,102 3 / 3

Sort (cost=383,060.5..383,179.93 rows=47,770 width=181) (actual time=1,452.167..1,470.117 rows=74,102 loops=3)

  • Sort Key: customer.c_custkey, customer.c_name, customer.c_acctbal, customer.c_phone, nation.n_name, customer.c_address, customer.c_comment
  • Sort Method: external merge Disk: 11,296kB
7. 18.444 1,317.467 ↓ 1.6 74,102 3 / 3

Hash Join (cost=364,421.23..375,102.36 rows=47,770 width=181) (actual time=1,252.825..1,317.467 rows=74,102 loops=3)

8. 91.133 1,299.003 ↓ 1.6 74,102 3 / 3

Hash Join (cost=364,419.67..374,443.96 rows=47,770 width=159) (actual time=1,252.782..1,299.003 rows=74,102 loops=3)

9. 14.270 14.270 ↑ 1.2 100,000 3 / 3

Seq Scan on customer customer (cost=0..8,419 rows=125,000 width=147) (actual time=0.008..14.27 rows=100,000 loops=3)

10. 37.778 1,193.600 ↓ 1.6 74,102 3 / 3

Hash (cost=363,822.55..363,822.55 rows=47,770 width=16) (actual time=1,193.6..1,193.6 rows=74,102 loops=3)

11. 190.787 1,155.822 ↓ 1.6 74,102 3 / 3

Hash Join (cost=71,534.1..363,822.55 rows=47,770 width=16) (actual time=156.698..1,155.822 rows=74,102 loops=3)

12. 808.656 808.656 ↑ 1.3 987,472 3 / 3

Seq Scan on lineitem lineitem (cost=0..287,409.56 rows=1,247,958 width=16) (actual time=0.012..808.656 rows=987,472 loops=3)

  • Filter: (l_returnflag = 'R'::bpchar)
13. 10.179 156.379 ↑ 1.3 36,910 3 / 3

Hash (cost=70,936..70,936 rows=47,848 width=8) (actual time=156.378..156.379 rows=36,910 loops=3)

14. 146.200 146.200 ↑ 1.3 36,910 3 / 3

Seq Scan on orders orders (cost=0..70,936 rows=47,848 width=8) (actual time=0.017..146.2 rows=36,910 loops=3)

  • Filter: ((o_orderdate >= '1993-02-01'::date) AND (o_orderdate < '1993-05-01'::date))
15. 0.008 0.020 ↑ 1.0 25 3 / 3

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.02..0.02 rows=25 loops=3)

16. 0.012 0.012 ↑ 1.0 25 3 / 3

Seq Scan on nation nation (cost=0..1.25 rows=25 width=30) (actual time=0.009..0.012 rows=25 loops=3)

Planning time : 0.374 ms
Execution time : 1,649.837 ms