explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y46a

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.355 20.066 ↓ 2.0 275 1

Nested Loop (cost=179.65..1,129.87 rows=138 width=76) (actual time=1.209..20.066 rows=275 loops=1)

2. 0.012 4.359 ↓ 2.0 276 1

Nested Loop Left Join (cost=178.94..573.77 rows=138 width=40) (actual time=1.119..4.359 rows=276 loops=1)

3. 0.098 3.519 ↓ 2.0 276 1

Nested Loop Left Join (cost=178.66..529.63 rows=138 width=19) (actual time=1.111..3.519 rows=276 loops=1)

4. 0.357 2.317 ↓ 2.0 276 1

Hash Join (cost=178.38..315.66 rows=138 width=19) (actual time=1.095..2.317 rows=276 loops=1)

  • Hash Cond: (va.vehicle_id = v.id)
5. 0.899 0.899 ↑ 1.0 726 1

Seq Scan on vehicle_availability va (cost=0.00..133.18 rows=727 width=8) (actual time=0.016..0.899 rows=726 loops=1)

  • Filter: (dock_id IS NOT NULL)
  • Rows Removed by Filter: 1393
6. 0.250 1.061 ↑ 1.0 980 1

Hash (cost=166.13..166.13 rows=980 width=11) (actual time=1.061..1.061 rows=980 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
7. 0.606 0.811 ↑ 1.0 980 1

Bitmap Heap Scan on vehicle v (cost=39.88..166.13 rows=980 width=11) (actual time=0.221..0.811 rows=980 loops=1)

  • Recheck Cond: ((system_id)::text = 'edinburgh-city-bikes'::text)
  • Heap Blocks: exact=49
8. 0.205 0.205 ↑ 1.0 980 1

Bitmap Index Scan on number_must_be_unique_per_system (cost=0.00..39.63 rows=980 width=0) (actual time=0.205..0.205 rows=980 loops=1)

  • Index Cond: ((system_id)::text = 'edinburgh-city-bikes'::text)
9. 1.104 1.104 ↑ 1.0 1 276

Index Scan using dock_pkey on dock d (cost=0.29..1.54 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=276)

  • Index Cond: (va.dock_id = id)
10. 0.828 0.828 ↑ 1.0 1 276

Index Scan using dock_group_pkey on dock_group dg (cost=0.28..0.31 rows=1 width=25) (actual time=0.002..0.003 rows=1 loops=276)

  • Index Cond: (d.dock_group_id = id)
11. 0.000 14.352 ↑ 1.0 1 276

Limit (cost=0.71..4.01 rows=1 width=40) (actual time=0.052..0.052 rows=1 loops=276)

12. 0.277 14.352 ↑ 9,886.0 1 276

Nested Loop (cost=0.71..32,596.92 rows=9,886 width=40) (actual time=0.052..0.052 rows=1 loops=276)

13. 13.800 13.800 ↑ 9,886.0 1 276

Index Scan using position_log_vehicle_position_idx on position_log_data pl (cost=0.56..30,794.15 rows=9,886 width=42) (actual time=0.050..0.050 rows=1 loops=276)

  • Index Cond: (vehicle_id = va.vehicle_id)
14. 0.275 0.275 ↑ 1.0 1 275

Index Only Scan using position_source_pkey on position_source ps (cost=0.15..0.17 rows=1 width=2) (actual time=0.001..0.001 rows=1 loops=275)

  • Index Cond: (id = pl.position_source_id)
  • Heap Fetches: 275