explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RCzo

Settings
# exclusive inclusive rows x rows loops node
1. 17.774 1,677.671 ↑ 1.0 20 1

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

2. 20.627 1,659.897 ↑ 5,732.4 20 1

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

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

GroupAggregate (cost=384,060.52..400,581.75 rows=114,647 width=201) (actual time=1,479.959..1,639.27 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. 50.622 1,601.409 ↑ 1.3 74,259 1

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

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

GroupAggregate (cost=383,060.5..384,971.3 rows=47,770 width=201) (actual time=1,471.803..1,550.787 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. 154.430 1,487.451 ↓ 1.6 74,102 3 / 3

Sort (cost=383,060.5..383,179.93 rows=47,770 width=181) (actual time=1,471.784..1,487.451 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: 18,600kB
7. 19.369 1,333.021 ↓ 1.6 74,102 3 / 3

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

8. 96.242 1,313.631 ↓ 1.6 74,102 3 / 3

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

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

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

10. 35.453 1,202.998 ↓ 1.6 74,102 3 / 3

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

11. 194.130 1,167.545 ↓ 1.6 74,102 3 / 3

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

12. 808.112 808.112 ↑ 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.008..808.112 rows=987,472 loops=3)

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

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

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

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

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

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.02..0.021 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.008..0.012 rows=25 loops=3)

Planning time : 0.489 ms
Execution time : 1,680.621 ms