explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8FRk

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 207.230 ↑ 13.0 1,631 1

Sort (cost=27,725.56..27,778.77 rows=21,283 width=36) (actual time=207.136..207.23 rows=1,631 loops=1)

  • Sort Key: (sum((partsupp.ps_supplycost * (partsupp.ps_availqty)::numeric))) DESC
  • Sort Method: quicksort Memory: 125kB
2.          

Initplan (for Sort)

3. 17.161 74.578 ↑ 1.0 1 1

Aggregate (cost=9,592.04..9,592.05 rows=1 width=32) (actual time=74.578..74.578 rows=1 loops=1)

4. 7.233 57.417 ↓ 1.0 65,600 1

Nested Loop (cost=1.75..9,113.16 rows=63,850 width=10) (actual time=0.05..57.417 rows=65,600 loops=1)

5. 2.197 4.264 ↓ 1.0 820 1

Hash Join (cost=1.32..727.33 rows=800 width=4) (actual time=0.039..4.264 rows=820 loops=1)

6. 2.057 2.057 ↑ 1.0 20,000 1

Seq Scan on supplier supplier_1 (cost=0..643 rows=20,000 width=8) (actual time=0.006..2.057 rows=20,000 loops=1)

7. 0.002 0.010 ↑ 1.0 1 1

Hash (cost=1.31..1.31 rows=1 width=4) (actual time=0.01..0.01 rows=1 loops=1)

8. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on nation nation_1 (cost=0..1.31 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: (n_name = 'SAUDI ARABIA'::bpchar)
9. 45.920 45.920 ↑ 1.0 80 820

Index Scan using partsupp_suppkey on partsupp partsupp_1 (cost=0.43..9.68 rows=80 width=14) (actual time=0.004..0.056 rows=80 loops=820)

  • Index Cond: (ps_suppkey = supplier_1.s_suppkey)
10. 113.912 206.643 ↑ 13.0 1,631 1

GroupAggregate (cost=14,209.16..16,603.54 rows=21,283 width=36) (actual time=161.042..206.643 rows=1,631 loops=1)

  • Group Key: partsupp.ps_partkey
  • Filter: (sum((partsupp.ps_supplycost * (partsupp.ps_availqty)::numeric)) > $1)
11. 30.030 92.731 ↓ 1.0 65,600 1

Sort (cost=14,209.16..14,368.79 rows=63,850 width=14) (actual time=86.439..92.731 rows=65,600 loops=1)

  • Sort Key: partsupp.ps_partkey
  • Sort Method: external merge Disk: 1,680kB
12. 8.875 62.701 ↓ 1.0 65,600 1

Nested Loop (cost=1.75..9,113.16 rows=63,850 width=14) (actual time=0.05..62.701 rows=65,600 loops=1)

13. 2.385 4.626 ↓ 1.0 820 1

Hash Join (cost=1.32..727.33 rows=800 width=4) (actual time=0.036..4.626 rows=820 loops=1)

14. 2.229 2.229 ↑ 1.0 20,000 1

Seq Scan on supplier supplier (cost=0..643 rows=20,000 width=8) (actual time=0.006..2.229 rows=20,000 loops=1)

15. 0.003 0.012 ↑ 1.0 1 1

Hash (cost=1.31..1.31 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=1)

16. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on nation nation (cost=0..1.31 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=1)

  • Filter: (n_name = 'SAUDI ARABIA'::bpchar)
17. 49.200 49.200 ↑ 1.0 80 820

Index Scan using partsupp_suppkey on partsupp partsupp (cost=0.43..9.68 rows=80 width=18) (actual time=0.004..0.06 rows=80 loops=820)

  • Index Cond: (ps_suppkey = supplier.s_suppkey)
Planning time : 0.203 ms
Execution time : 207.735 ms