explain.depesz.com

PostgreSQL's explain analyze made readable

Result: o2Ii

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

Sort (cost=104,377.71..104,430.91 rows=21,280 width=36) (actual time=381.791..381.897 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. 0.000 154.280 ↑ 1.0 1 1

Aggregate (cost=46,252.43..46,252.44 rows=1 width=32) (actual time=154.28..154.28 rows=1 loops=1)

4. 2.483 154.322 ↓ 1.5 3 1

Gather (cost=46,252.21..46,252.42 rows=2 width=32) (actual time=154.195..154.322 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 8.380 151.839 ↑ 1.0 1 3 / 3

Aggregate (cost=45,252.21..45,252.22 rows=1 width=32) (actual time=151.839..151.839 rows=1 loops=3)

6. 68.419 143.459 ↑ 1.2 21,867 3 / 3

Hash Join (cost=737.33..45,052.71 rows=26,600 width=10) (actual time=5.661..143.459 rows=21,867 loops=3)

7. 69.467 69.467 ↑ 1.2 533,333 3 / 3

Seq Scan on partsupp partsupp_1 (cost=0..41,549.73 rows=666,573 width=14) (actual time=0.005..69.467 rows=533,333 loops=3)

8. 0.158 5.573 ↓ 1.0 820 3 / 3

Hash (cost=727.33..727.33 rows=800 width=4) (actual time=5.573..5.573 rows=820 loops=3)

9. 2.821 5.415 ↓ 1.0 820 3 / 3

Hash Join (cost=1.32..727.33 rows=800 width=4) (actual time=0.056..5.415 rows=820 loops=3)

10. 2.580 2.580 ↑ 1.0 20,000 3 / 3

Seq Scan on supplier supplier_1 (cost=0..643 rows=20,000 width=8) (actual time=0.009..2.58 rows=20,000 loops=3)

11. 0.003 0.014 ↑ 1.0 1 3 / 3

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

12. 0.011 0.011 ↑ 1.0 1 3 / 3

Seq Scan on nation nation_1 (cost=0..1.31 rows=1 width=4) (actual time=0.01..0.011 rows=1 loops=3)

  • Filter: (n_name = 'SAUDI ARABIA'::bpchar)
13. 202.234 381.245 ↑ 13.0 1,631 1

GroupAggregate (cost=48,007.72..56,595.53 rows=21,280 width=36) (actual time=304.456..381.245 rows=1,631 loops=1)

  • Group Key: partsupp.ps_partkey
  • Filter: (sum((partsupp.ps_supplycost * (partsupp.ps_availqty)::numeric)) > $1)
14. 9.972 179.011 ↓ 1.2 61,868 1

Gather Merge (cost=48,007.72..54,813.32 rows=53,200 width=36) (actual time=150.132..179.011 rows=61,868 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
15. 19.914 169.039 ↑ 1.3 20,623 3 / 3

GroupAggregate (cost=47,007.69..47,672.69 rows=26,600 width=36) (actual time=147.692..169.039 rows=20,623 loops=3)

  • Group Key: partsupp.ps_partkey
16. 7.601 149.125 ↑ 1.2 21,867 3 / 3

Sort (cost=47,007.69..47,074.19 rows=26,600 width=14) (actual time=147.68..149.125 rows=21,867 loops=3)

  • Sort Key: partsupp.ps_partkey
  • Sort Method: quicksort Memory: 1,598kB
17. 67.317 141.524 ↑ 1.2 21,867 3 / 3

Hash Join (cost=737.33..45,052.71 rows=26,600 width=14) (actual time=5.454..141.524 rows=21,867 loops=3)

18. 68.788 68.788 ↑ 1.2 533,333 3 / 3

Seq Scan on partsupp partsupp (cost=0..41,549.73 rows=666,573 width=18) (actual time=0.005..68.788 rows=533,333 loops=3)

19. 0.156 5.419 ↓ 1.0 820 3 / 3

Hash (cost=727.33..727.33 rows=800 width=4) (actual time=5.419..5.419 rows=820 loops=3)

20. 2.746 5.263 ↓ 1.0 820 3 / 3

Hash Join (cost=1.32..727.33 rows=800 width=4) (actual time=0.048..5.263 rows=820 loops=3)

21. 2.503 2.503 ↑ 1.0 20,000 3 / 3

Seq Scan on supplier supplier (cost=0..643 rows=20,000 width=8) (actual time=0.009..2.503 rows=20,000 loops=3)

22. 0.003 0.014 ↑ 1.0 1 3 / 3

Hash (cost=1.31..1.31 rows=1 width=4) (actual time=0.013..0.014 rows=1 loops=3)

23. 0.011 0.011 ↑ 1.0 1 3 / 3

Seq Scan on nation nation (cost=0..1.31 rows=1 width=4) (actual time=0.01..0.011 rows=1 loops=3)

  • Filter: (n_name = 'SAUDI ARABIA'::bpchar)
Planning time : 0.179 ms
Execution time : 382.129 ms