explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mOQa : Optimization for: plan #2rAo

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.006 2.587 ↑ 1.0 50 1

Limit (cost=9,694.30..9,694.42 rows=50 width=68) (actual time=2.575..2.587 rows=50 loops=1)

2. 0.422 2.581 ↑ 51.2 50 1

Sort (cost=9,694.30..9,700.69 rows=2,558 width=68) (actual time=2.574..2.581 rows=50 loops=1)

  • Sort Key: vehicle_availability_history.created_at DESC
  • Sort Method: top-N heapsort Memory: 32kB
3. 0.120 2.159 ↑ 2.2 1,160 1

Append (cost=60.35..9,609.32 rows=2,558 width=68) (actual time=0.444..2.159 rows=1,160 loops=1)

4. 1.707 1.988 ↑ 2.2 1,142 1

Bitmap Heap Scan on vehicle_availability_history (cost=60.35..9,560.43 rows=2,553 width=68) (actual time=0.444..1.988 rows=1,142 loops=1)

  • Recheck Cond: ((vehicle_id = 1746) AND (deleted_at IS NULL))
  • Heap Blocks: exact=1020
5. 0.281 0.281 ↑ 2.2 1,142 1

Bitmap Index Scan on "test HACK BY BERGE, replace me" (cost=0.00..59.71 rows=2,553 width=0) (actual time=0.281..0.281 rows=1,142 loops=1)

  • Index Cond: (vehicle_id = 1746)
6. 0.051 0.051 ↓ 3.6 18 1

Index Scan using mutation_log_entity_idx on mutation_log (cost=0.56..23.32 rows=5 width=68) (actual time=0.030..0.051 rows=18 loops=1)

  • Index Cond: (((entity_kind)::text = 'Vehicle'::text) AND ((entity_id)::text = '1746'::text))
Planning time : 0.222 ms
Execution time : 2.640 ms