explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0OQJ

Settings
# exclusive inclusive rows x rows loops node
1. 3.726 4.070 ↓ 4.0 4 1

Nested Loop (cost=1.26..20.24 rows=1 width=1,118) (actual time=1.326..4.070 rows=4 loops=1)

2. 0.005 0.170 ↓ 2.0 2 1

Nested Loop (cost=0.84..17.06 rows=1 width=1,117) (actual time=0.114..0.170 rows=2 loops=1)

3. 0.004 0.042 ↑ 1.0 1 1

Nested Loop (cost=0.57..16.62 rows=1 width=37) (actual time=0.040..0.042 rows=1 loops=1)

4. 0.025 0.025 ↑ 1.0 1 1

Index Scan using vehicle_id_unique_key on rpd_ts_on_route rpd (cost=0.29..8.30 rows=1 width=5) (actual time=0.024..0.025 rows=1 loops=1)

  • Index Cond: ((vehicle_id)::text = '10088347_MGT'::text)
5. 0.013 0.013 ↑ 1.0 1 1

Index Scan using route_internal_id_index on route r (cost=0.29..8.30 rows=1 width=57) (actual time=0.011..0.013 rows=1 loops=1)

  • Index Cond: ((internal_id)::text = (rpd.route_id)::text)
6. 0.123 0.123 ↓ 2.0 2 1

Index Scan using active_period_idx on route_path_active_period act (cost=0.27..0.44 rows=1 width=1,080) (actual time=0.071..0.123 rows=2 loops=1)

  • Index Cond: (((route_id)::text = (r.id)::text) AND (active_period @> '2019-05-13 06:15:00'::timestamp without time zone))
7. 0.174 0.174 ↓ 2.0 2 2

Index Scan using "FK_index_route_path" on route_path rp (cost=0.41..2.92 rows=1 width=3,133) (actual time=0.017..0.087 rows=2 loops=2)

  • Index Cond: ((route_id)::text = (r.id)::text)
  • Filter: active
  • Rows Removed by Filter: 34
Planning time : 2.012 ms
Execution time : 4.211 ms