explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MmJh : Optimization for: plan #y46a

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.767 6.707 ↓ 2.0 276 1

Nested Loop (cost=179.50..1,081.36 rows=138 width=76) (actual time=0.794..6.707 rows=276 loops=1)

2. 0.000 2.893 ↓ 2.0 277 1

Nested Loop Left Join (cost=178.94..573.77 rows=138 width=40) (actual time=0.736..2.893 rows=277 loops=1)

3. 0.236 2.363 ↓ 2.0 277 1

Nested Loop Left Join (cost=178.66..529.63 rows=138 width=19) (actual time=0.731..2.363 rows=277 loops=1)

4. 0.220 1.573 ↓ 2.0 277 1

Hash Join (cost=178.38..315.66 rows=138 width=19) (actual time=0.721..1.573 rows=277 loops=1)

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

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

  • Filter: (dock_id IS NOT NULL)
  • Rows Removed by Filter: 1392
6. 0.149 0.696 ↑ 1.0 980 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 49kB
7. 0.416 0.547 ↑ 1.0 980 1

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

  • Recheck Cond: ((system_id)::text = 'edinburgh-city-bikes'::text)
  • Heap Blocks: exact=49
8. 0.131 0.131 ↑ 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.131..0.131 rows=980 loops=1)

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

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

  • Index Cond: (va.dock_id = id)
10. 0.554 0.554 ↑ 1.0 1 277

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

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

Limit (cost=0.56..3.66 rows=1 width=40) (actual time=0.011..0.011 rows=1 loops=277)

12. 3.047 3.047 ↑ 9,886.0 1 277

Index Only Scan using position_log_vehicle_position_idx on position_log_data pl (cost=0.56..30,604.51 rows=9,886 width=40) (actual time=0.011..0.011 rows=1 loops=277)

  • Index Cond: (vehicle_id = va.vehicle_id)
  • Heap Fetches: 276
Planning time : 0.790 ms
Execution time : 6.787 ms