explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cCZr : q21-src

Settings
# exclusive inclusive rows x rows loops node
1. 1.433 1,580.440 ↓ 411.0 411 1

Sort (cost=114,826.32..114,826.32 rows=1 width=26) (actual time=1,580.408..1,580.440 rows=411 loops=1)

  • Sort Key: (count(*)) DESC, supplier.s_name
  • Sort Method: quicksort Memory: 57kB
2. 2.195 1,579.007 ↓ 411.0 411 1

GroupAggregate (cost=2.01..114,826.31 rows=1 width=26) (actual time=16.744..1,579.007 rows=411 loops=1)

  • Group Key: supplier.s_name
3. 45.027 1,576.812 ↓ 4,141.0 4,141 1

Nested Loop Anti Join (cost=2.01..114,826.29 rows=1 width=26) (actual time=2.215..1,576.812 rows=4,141 loops=1)

4. 30.968 1,385.607 ↓ 73,089.0 73,089 1

Nested Loop Semi Join (cost=1.58..114,824.58 rows=1 width=34) (actual time=0.220..1,385.607 rows=73,089 loops=1)

  • Join Filter: (orders.o_orderkey = l2.l_orderkey)
5. 0.000 1,051.155 ↓ 1.9 75,871 1

Nested Loop (cost=1.15..67,726.71 rows=38,911 width=38) (actual time=0.207..1,051.155 rows=75,871 loops=1)

6. 20.021 427.375 ↓ 2.0 156,739 1

Nested Loop (cost=0.72..26,514.76 rows=79,573 width=34) (actual time=0.166..427.375 rows=156,739 loops=1)

7. 4.225 7.451 ↓ 1.0 411 1

Nested Loop (cost=0.29..778.75 rows=400 width=30) (actual time=0.134..7.451 rows=411 loops=1)

  • Join Filter: (supplier.s_nationkey = nation.n_nationkey)
  • Rows Removed by Join Filter: 9589
8. 3.226 3.226 ↑ 1.0 10,000 1

Index Scan using supplier_idx_1 on supplier (cost=0.29..627.43 rows=10,000 width=34) (actual time=0.059..3.226 rows=10,000 loops=1)

9. 0.000 0.000 ↑ 1.0 1 10,000

Materialize (cost=0.00..1.32 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=10,000)

10. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on nation (cost=0.00..1.31 rows=1 width=4) (actual time=0.011..0.012 rows=1 loops=1)

  • Filter: (n_name = 'SAUDI ARABIA'::bpchar)
  • Rows Removed by Filter: 24
11. 399.903 399.903 ↓ 1.9 381 411

Index Scan using lineitem_idx_2 on lineitem l1 (cost=0.43..62.35 rows=199 width=8) (actual time=0.019..0.973 rows=381 loops=411)

  • Index Cond: (l_suppkey = supplier.s_suppkey)
  • Filter: (l_receiptdate > l_commitdate)
  • Rows Removed by Filter: 220
12. 626.956 626.956 ↓ 0.0 0 156,739

Index Scan using orders_pkey on orders (cost=0.43..0.51 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=156,739)

  • Index Cond: (o_orderkey = l1.l_orderkey)
  • Filter: (o_orderstatus = 'F'::bpchar)
  • Rows Removed by Filter: 1
13. 303.484 303.484 ↑ 16.0 1 75,871

Index Scan using lineitem_idx_4 on lineitem l2 (cost=0.43..1.01 rows=16 width=8) (actual time=0.004..0.004 rows=1 loops=75,871)

  • Index Cond: (l_orderkey = l1.l_orderkey)
  • Filter: (l_suppkey <> l1.l_suppkey)
  • Rows Removed by Filter: 0
14. 146.178 146.178 ↑ 5.0 1 73,089

Index Scan using lineitem_idx_4 on lineitem l3 (cost=0.43..1.05 rows=5 width=8) (actual time=0.002..0.002 rows=1 loops=73,089)

  • Index Cond: (l_orderkey = l1.l_orderkey)
  • Filter: ((l_receiptdate > l_commitdate) AND (l_suppkey <> l1.l_suppkey))
  • Rows Removed by Filter: 1
Planning time : 3.483 ms
Execution time : 1,580.642 ms