explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3LFP

Settings
# exclusive inclusive rows x rows loops node
1. 18.444 1,743.919 ↑ 1.0 20 1

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

2. 34.365 1,725.475 ↑ 5,732.4 20 1

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

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

GroupAggregate (cost=384,060.52..400,581.75 rows=114,647 width=201) (actual time=1,473.532..1,691.11 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. 15.888 1,620.179 ↑ 1.3 74,259 1

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

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

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

Sort (cost=383,060.5..383,179.93 rows=47,770 width=181) (actual time=1,465.357..1,491.567 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,568kB
7. 19.840 1,323.138 ↓ 1.6 74,102 3 / 3

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

8. 97.071 1,303.277 ↓ 1.6 74,102 3 / 3

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

9. 14.392 14.392 ↑ 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.392 rows=100,000 loops=3)

10. 36.063 1,191.814 ↓ 1.6 74,102 3 / 3

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

11. 192.090 1,155.751 ↓ 1.6 74,102 3 / 3

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

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

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

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

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

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

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

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

16. 0.013 0.013 ↑ 1.0 25 3 / 3

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

Planning time : 0.5 ms
Execution time : 1,745.462 ms