explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fSqR : q18-norm

Settings
# exclusive inclusive rows x rows loops node
1. 0.065 4,900.708 ↑ 52,646.7 57 1

Sort (cost=1,627,373.50..1,634,875.65 rows=3,000,860 width=71) (actual time=4,900.704..4,900.708 rows=57 loops=1)

  • Sort Key: o.o_totalprice DESC, o.o_orderdate
  • Sort Method: quicksort Memory: 29kB
2. 0.203 4,900.643 ↑ 52,646.7 57 1

GroupAggregate (cost=1,061,407.91..1,151,433.71 rows=3,000,860 width=44) (actual time=4,900.451..4,900.643 rows=57 loops=1)

  • Group Key: c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice
3. 1.285 4,900.440 ↑ 7,521.0 399 1

Sort (cost=1,061,407.91..1,068,910.06 rows=3,000,860 width=44) (actual time=4,900.416..4,900.440 rows=399 loops=1)

  • Sort Key: c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice
  • Sort Method: quicksort Memory: 56kB
4. 1.751 4,899.155 ↑ 7,521.0 399 1

Hash Join (cost=379,951.64..646,248.71 rows=3,000,860 width=44) (actual time=3,632.299..4,899.155 rows=399 loops=1)

  • Hash Cond: (o.o_custkey = c.c_custkey)
5. 598.010 4,833.135 ↑ 7,521.0 399 1

Hash Join (cost=372,991.64..598,026.89 rows=3,000,860 width=25) (actual time=3,566.908..4,833.135 rows=399 loops=1)

  • Hash Cond: (l.l_orderkey = o.o_orderkey)
6. 674.808 674.808 ↑ 1.0 6,001,215 1

Seq Scan on lineitem l (cost=0.00..172,520.20 rows=6,001,720 width=9) (actual time=0.004..674.808 rows=6,001,215 loops=1)

7. 0.223 3,560.317 ↑ 13,157.9 57 1

Hash (cost=363,616.64..363,616.64 rows=750,000 width=24) (actual time=3,560.317..3,560.317 rows=57 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 8196kB
8. 194.927 3,560.094 ↑ 13,157.9 57 1

Hash Join (cost=312,996.21..363,616.64 rows=750,000 width=24) (actual time=3,183.196..3,560.094 rows=57 loops=1)

  • Hash Cond: (o.o_orderkey = l2.l_orderkey)
9. 185.310 185.310 ↑ 1.0 1,500,000 1

Seq Scan on orders o (cost=0.00..41,095.00 rows=1,500,000 width=20) (actual time=0.010..185.310 rows=1,500,000 loops=1)

10. 0.308 3,179.857 ↑ 6,842.9 57 1

Hash (cost=308,120.67..308,120.67 rows=390,043 width=4) (actual time=3,179.857..3,179.857 rows=57 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 4099kB
11. 1,806.414 3,179.549 ↑ 6,842.9 57 1

GroupAggregate (cost=0.43..304,220.24 rows=390,043 width=9) (actual time=3.799..3,179.549 rows=57 loops=1)

  • Group Key: l2.l_orderkey
  • Filter: (sum(l2.l_quantity) > '300'::numeric)
  • Rows Removed by Filter: 1499943
12. 1,373.135 1,373.135 ↑ 1.0 6,001,215 1

Index Scan using lineitem_idx_4 on lineitem l2 (cost=0.43..268,361.00 rows=6,001,720 width=9) (actual time=0.015..1,373.135 rows=6,001,215 loops=1)

13. 32.973 64.269 ↑ 1.0 150,000 1

Hash (cost=5,085.00..5,085.00 rows=150,000 width=23) (actual time=64.269..64.269 rows=150,000 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 10252kB
14. 31.296 31.296 ↑ 1.0 150,000 1

Seq Scan on customer c (cost=0.00..5,085.00 rows=150,000 width=23) (actual time=0.007..31.296 rows=150,000 loops=1)

Planning time : 4.298 ms
Execution time : 4,902.135 ms