explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a2ZO : Optimization for: R1 - Origin; index price

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.413 ↓ 1.8 7 1

Nested Loop (cost=2.38..54.54 rows=4 width=266) (actual time=0.298..0.413 rows=7 loops=1)

2.          

Initplan (forNested Loop)

3. 0.002 0.155 ↑ 1.0 1 1

Result (cost=0.53..0.54 rows=1 width=32) (actual time=0.155..0.155 rows=1 loops=1)

4.          

Initplan (forResult)

5. 0.001 0.153 ↑ 1.0 1 1

Limit (cost=0.43..0.53 rows=1 width=8) (actual time=0.153..0.153 rows=1 loops=1)

6. 0.152 0.152 ↑ 1,500,000.0 1 1

Index Only Scan using index_price on orders orders_1 (cost=0.43..153,534.08 rows=1,500,000 width=8) (actual time=0.152..0.152 rows=1 loops=1)

  • Index Cond: (o_totalprice IS NOT NULL)
  • Heap Fetches: 1
7. 0.006 0.400 ↓ 1.8 7 1

Nested Loop (cost=1.70..53.37 rows=4 width=166) (actual time=0.292..0.400 rows=7 loops=1)

8. 0.003 0.289 ↓ 1.8 7 1

Nested Loop (cost=1.42..52.16 rows=4 width=140) (actual time=0.268..0.289 rows=7 loops=1)

9. 0.001 0.230 ↑ 1.0 1 1

Nested Loop (cost=0.98..17.04 rows=1 width=135) (actual time=0.230..0.230 rows=1 loops=1)

10. 0.002 0.206 ↑ 1.0 1 1

Nested Loop (cost=0.85..16.88 rows=1 width=35) (actual time=0.206..0.206 rows=1 loops=1)

11. 0.167 0.167 ↑ 1.0 1 1

Index Scan using index_price on orders (cost=0.43..8.45 rows=1 width=16) (actual time=0.167..0.167 rows=1 loops=1)

  • Index Cond: (o_totalprice = $1)
12. 0.037 0.037 ↑ 1.0 1 1

Index Scan using pkcustomer on customer (cost=0.42..8.44 rows=1 width=27) (actual time=0.037..0.037 rows=1 loops=1)

  • Index Cond: (c_custkey = orders.o_custkey)
13. 0.023 0.023 ↑ 1.0 1 1

Index Scan using pknation on nation (cost=0.14..0.16 rows=1 width=108) (actual time=0.023..0.023 rows=1 loops=1)

  • Index Cond: (n_nationkey = customer.c_nationkey)
14. 0.056 0.056 ↑ 2.3 7 1

Index Scan using pklineitem on lineitem (cost=0.43..34.96 rows=16 width=13) (actual time=0.038..0.056 rows=7 loops=1)

  • Index Cond: (l_orderkey = orders.o_orderkey)
15. 0.105 0.105 ↑ 1.0 1 7

Index Scan using pksupplier on supplier (cost=0.29..0.30 rows=1 width=34) (actual time=0.015..0.015 rows=1 loops=7)

  • Index Cond: (s_suppkey = lineitem.l_suppkey)
16. 0.007 0.007 ↑ 1.0 1 7

Index Scan using pknation on nation nation_1 (cost=0.14..0.16 rows=1 width=108) (actual time=0.001..0.001 rows=1 loops=7)

  • Index Cond: (n_nationkey = supplier.s_nationkey)