explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2nDW

Settings
# exclusive inclusive rows x rows loops node
1. 0.099 2.213 ↓ 2.0 2 1

Nested Loop (cost=5.51..33.06 rows=1 width=28) (actual time=0.440..2.213 rows=2 loops=1)

2. 0.089 1.654 ↓ 1.9 46 1

Nested Loop (cost=5.37..28.74 rows=24 width=21) (actual time=0.355..1.654 rows=46 loops=1)

3. 0.660 1.240 ↑ 1.0 5 1

Hash Join (cost=5.09..26.96 rows=5 width=17) (actual time=0.247..1.240 rows=5 loops=1)

  • Hash Cond: (a.stop_id = stopa.id)
4. 0.475 0.475 ↑ 1.0 1,174 1

Seq Scan on routes a (cost=0.00..18.74 rows=1,174 width=10) (actual time=0.015..0.475 rows=1,174 loops=1)

5. 0.005 0.105 ↑ 1.0 1 1

Hash (cost=5.08..5.08 rows=1 width=15) (actual time=0.105..0.105 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
6. 0.100 0.100 ↑ 1.0 1 1

Seq Scan on stops stopa (cost=0.00..5.08 rows=1 width=15) (actual time=0.027..0.100 rows=1 loops=1)

  • Filter: ((name)::text = 'Craiglockhart'::text)
  • Rows Removed by Filter: 245
7. 0.325 0.325 ↓ 9.0 9 5

Index Scan using route_pkey on routes b (cost=0.28..0.35 rows=1 width=10) (actual time=0.052..0.065 rows=9 loops=5)

  • Index Cond: (((num)::text = (a.num)::text) AND ((company)::text = (a.company)::text))
8. 0.460 0.460 ↓ 0.0 0 46

Index Scan using stops_pkey on stops stopb (cost=0.14..0.18 rows=1 width=15) (actual time=0.010..0.010 rows=0 loops=46)

  • Index Cond: (id = b.stop_id)
  • Filter: ((name)::text = 'London Road'::text)
  • Rows Removed by Filter: 1
Planning time : 5.787 ms
Execution time : 2.296 ms