explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 59pE : 345

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 9.471 ↓ 7.7 154 1

Unique (cost=162.38..162.53 rows=20 width=16) (actual time=9.411..9.471 rows=154 loops=1)

2. 0.362 9.435 ↓ 15.5 310 1

Sort (cost=162.38..162.43 rows=20 width=16) (actual time=9.410..9.435 rows=310 loops=1)

  • Sort Key: rtt.mobject_id, rtt.route_id
  • Sort Method: quicksort Memory: 39kB
3. 4.945 9.073 ↓ 15.5 310 1

Nested Loop Semi Join (cost=49.90..161.94 rows=20 width=16) (actual time=2.078..9.073 rows=310 loops=1)

  • Join Filter: (rtt.mobject_id = m.id)
  • Rows Removed by Join Filter: 53150
4. 0.074 0.408 ↓ 7.8 310 1

Bitmap Heap Scan on uzgps_routing_trip_template rtt (cost=4.72..106.91 rows=40 width=16) (actual time=0.345..0.408 rows=310 loops=1)

  • Recheck Cond: ((time_start >= ((date_part('epoch'::text, date_trunc('day'::text, now())) * '1000'::double precision))::bigint) AND (time_start <= ((date_part('epoch'::text, date_trunc('day'::text, (now() + '1 day'::interval))) * '1000': (...)
  • Heap Blocks: exact=8
5. 0.334 0.334 ↓ 7.8 310 1

Bitmap Index Scan on uzgps_routing_trip_template_time_start_idx (cost=0.00..4.71 rows=40 width=0) (actual time=0.334..0.334 rows=310 loops=1)

  • Index Cond: ((time_start >= ((date_part('epoch'::text, date_trunc('day'::text, now())) * '1000'::double precision))::bigint) AND (time_start <= ((date_part('epoch'::text, date_trunc('day'::text, (now() + '1 day'::interval))) * '10 (...)
6. 2.176 3.720 ↓ 57.3 172 310

Materialize (cost=45.18..53.24 rows=3 width=8) (actual time=0.004..0.012 rows=172 loops=310)

7. 0.015 1.544 ↓ 70.7 212 1

Nested Loop (cost=45.18..53.22 rows=3 width=8) (actual time=1.145..1.544 rows=212 loops=1)

8. 0.008 1.089 ↓ 2.0 2 1

HashAggregate (cost=44.91..44.91 rows=1 width=16) (actual time=1.088..1.089 rows=2 loops=1)

  • Group Key: c.id
9. 0.013 1.081 ↓ 11.0 11 1

Nested Loop Semi Join (cost=1.41..44.90 rows=1 width=16) (actual time=0.088..1.081 rows=11 loops=1)

  • Join Filter: (c.id = uzgps_user_access_list.ual_contractid)
  • Rows Removed by Join Filter: 55
10. 1.013 1.013 ↓ 11.0 11 1

Seq Scan on uzgps_contract c (cost=0.00..43.16 rows=1 width=8) (actual time=0.040..1.013 rows=11 loops=1)

  • Filter: ((status_id = ANY ('{1,2}'::bigint[])) AND ((c_status)::text = 'A'::text))
11. 0.026 0.055 ↑ 1.7 6 11

HashAggregate (cost=1.41..1.51 rows=10 width=8) (actual time=0.004..0.005 rows=6 loops=11)

  • Group Key: uzgps_user_access_list.ual_contractid
12. 0.029 0.029 ↓ 3.2 32 1

Seq Scan on uzgps_user_access_list (cost=0.00..1.39 rows=10 width=8) (actual time=0.019..0.029 rows=32 loops=1)

  • Filter: (ual_routing > 0)
13. 0.440 0.440 ↓ 106.0 106 2

Index Scan using uzgps_mobject_mo_contract_id_mo_status_idx on uzgps_mobject m (cost=0.28..8.30 rows=1 width=16) (actual time=0.057..0.220 rows=106 loops=2)

  • Index Cond: ((mo_contract_id = c.id) AND ((mo_status)::text = 'A'::text))