explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 28qT : q18-source

Settings
# exclusive inclusive rows x rows loops node
1. 0.212 5,503.340 ↑ 52,638.7 57 1

GroupAggregate (cost=1,060,523.88..1,150,536.12 rows=3,000,408 width=44) (actual time=5,503.149..5,503.340 rows=57 loops=1)

  • Group Key: orders.o_totalprice, orders.o_orderdate, customer.c_name, customer.c_custkey, orders.o_orderkey
2. 0.701 5,503.128 ↑ 7,519.8 399 1

Sort (cost=1,060,523.88..1,068,024.90 rows=3,000,408 width=44) (actual time=5,503.108..5,503.128 rows=399 loops=1)

  • Sort Key: orders.o_totalprice DESC, orders.o_orderdate, customer.c_name, customer.c_custkey, orders.o_orderkey
  • Sort Method: quicksort Memory: 56kB
3. 1.744 5,502.427 ↑ 7,519.8 399 1

Hash Join (cost=379,156.67..645,430.58 rows=3,000,408 width=44) (actual time=4,356.944..5,502.427 rows=399 loops=1)

  • Hash Cond: (orders.o_custkey = customer.c_custkey)
4. 580.073 5,416.365 ↑ 7,519.8 399 1

Hash Join (cost=372,196.67..597,214.97 rows=3,000,408 width=25) (actual time=4,271.486..5,416.365 rows=399 loops=1)

  • Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
5. 571.192 571.192 ↓ 1.0 6,001,215 1

Seq Scan on lineitem (cost=0.00..172,511.16 rows=6,000,816 width=9) (actual time=0.004..571.192 rows=6,001,215 loops=1)

6. 0.275 4,265.100 ↑ 13,157.9 57 1

Hash (cost=362,821.67..362,821.67 rows=750,000 width=24) (actual time=4,265.100..4,265.100 rows=57 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 8196kB
7. 213.351 4,264.825 ↑ 13,157.9 57 1

Hash Join (cost=312,364.72..362,821.67 rows=750,000 width=24) (actual time=3,741.581..4,264.825 rows=57 loops=1)

  • Hash Cond: (orders.o_orderkey = lineitem_1.l_orderkey)
8. 313.384 313.384 ↑ 1.0 1,500,000 1

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

9. 0.302 3,738.090 ↑ 6,556.1 57 1

Hash (cost=307,693.53..307,693.53 rows=373,695 width=4) (actual time=3,738.090..3,738.090 rows=57 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 4099kB
10. 1,789.078 3,737.788 ↑ 6,556.1 57 1

GroupAggregate (cost=0.43..303,956.58 rows=373,695 width=9) (actual time=4.428..3,737.788 rows=57 loops=1)

  • Group Key: lineitem_1.l_orderkey
  • Filter: (sum(lineitem_1.l_quantity) > '300'::numeric)
  • Rows Removed by Filter: 1499943
11. 1,948.710 1,948.710 ↓ 1.0 6,001,215 1

Index Scan using lineitem_idx_4 on lineitem lineitem_1 (cost=0.43..268,347.07 rows=6,000,816 width=9) (actual time=0.019..1,948.710 rows=6,001,215 loops=1)

12. 33.993 84.318 ↑ 1.0 150,000 1

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

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

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

Planning time : 4.428 ms
Execution time : 5,504.735 ms