explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7X8m

Settings
# exclusive inclusive rows x rows loops node
1. 7,525.515 18,392.862 ↓ 100.0 100 1

Limit (cost=833,609.3..833,609.3 rows=1 width=34) (actual time=10,867.341..18,392.862 rows=100 loops=1)

2. 1.166 10,867.347 ↓ 100.0 100 1

Sort (cost=833,609.3..833,609.3 rows=1 width=34) (actual time=10,867.339..10,867.347 rows=100 loops=1)

  • Sort Key: (count(*)) DESC, supplier.s_name
  • Sort Method: top-N heapsort Memory: 37kB
3. 1.869 10,866.181 ↓ 809.0 809 1

GroupAggregate (cost=833,609.27..833,609.29 rows=1 width=34) (actual time=10,863.447..10,866.181 rows=809 loops=1)

  • Group Key: supplier.s_name
4. 0.000 10,864.312 ↓ 7,996.0 7,996 1

Sort (cost=833,609.27..833,609.27 rows=1 width=26) (actual time=10,863.432..10,864.312 rows=7,996 loops=1)

  • Sort Key: supplier.s_name
  • Sort Method: quicksort Memory: 817kB
5. 7,538.030 18,323.598 ↓ 7,996.0 7,996 1

Gather (cost=730,349.96..833,609.26 rows=1 width=26) (actual time=9,816.724..18,323.598 rows=7,996 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 1,001.409 10,785.568 ↓ 2,665.0 2,665 3 / 3

Hash Join (cost=729,349.96..832,609.16 rows=1 width=26) (actual time=9,815.329..10,785.568 rows=2,665 loops=3)

7. 844.225 6,713.655 ↓ 4,467.0 4,467 3 / 3

Hash Join (cost=372,420.75..456,149.94 rows=1 width=38) (actual time=5,997.099..6,713.655 rows=4,467 loops=3)

8. 482.907 1,989.391 ↓ 1.5 49,466 3 / 3

Hash Join (cost=57,671.34..134,209.74 rows=32,959 width=38) (actual time=1,125.014..1,989.391 rows=49,466 loops=3)

9. 382.274 382.274 ↑ 1.3 487,105 3 / 3

Seq Scan on orders orders (cost=0..67,811 rows=618,083 width=4) (actual time=0.012..382.274 rows=487,105 loops=3)

  • Filter: (o_orderstatus = 'F'::bpchar)
10. 166.960 1,124.210 ↓ 1.9 307,442 3 / 3

Hash (cost=54,421.67..54,421.67 rows=159,973 width=34) (actual time=1,124.209..1,124.21 rows=307,442 loops=3)

11. 87.211 957.250 ↓ 1.9 307,442 3 / 3

Nested Loop (cost=0.56..54,421.67 rows=159,973 width=34) (actual time=0.075..957.25 rows=307,442 loops=3)

12. 4.022 9.263 ↓ 1.0 809 3 / 3

Nested Loop (cost=0..894.31 rows=800 width=30) (actual time=0.036..9.263 rows=809 loops=3)

13. 0.024 0.024 ↑ 1.0 1 3 / 3

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

  • Filter: (n_name = 'UNITED STATES'::bpchar)
14. 5.217 5.217 ↑ 1.0 20,000 3 / 3

Seq Scan on supplier supplier (cost=0..643 rows=20,000 width=34) (actual time=0.007..5.217 rows=20,000 loops=3)

15. 860.776 860.776 ↓ 1.9 380 2,427 / 3

Index Scan using lineitem_skey_rdate_cdate on lineitem l1 (cost=0.56..64.9 rows=201 width=8) (actual time=0.037..1.064 rows=380 loops=2,427)

  • Index Cond: (l_suppkey = supplier.s_suppkey)
  • Filter: (l_receiptdate > l_commitdate)
16. 1,852.501 3,880.039 ↓ 1.5 2,528,028 3 / 3

Hash (cost=287,409.56..287,409.56 rows=1,666,388 width=8) (actual time=3,880.039..3,880.039 rows=2,528,028 loops=3)

17. 2,027.538 2,027.538 ↓ 1.5 2,528,028 3 / 3

Seq Scan on lineitem l3 (cost=0..287,409.56 rows=1,666,388 width=8) (actual time=0.008..2,027.538 rows=2,528,028 loops=3)

  • Filter: (l_receiptdate > l_commitdate)
18. 1,573.938 3,070.504 ↑ 1.2 3,999,332 3 / 3

Hash (cost=274,911.65..274,911.65 rows=4,999,165 width=8) (actual time=3,070.504..3,070.504 rows=3,999,332 loops=3)

19. 1,496.566 1,496.566 ↑ 1.2 3,999,332 3 / 3

Seq Scan on lineitem l2 (cost=0..274,911.65 rows=4,999,165 width=8) (actual time=0.006..1,496.566 rows=3,999,332 loops=3)

Planning time : 1.295 ms
Execution time : 18,392.99 ms