explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iKMK : 234

Settings
# exclusive inclusive rows x rows loops node
1. 0.082 7.607 ↓ 7.7 154 1

Unique (cost=78.72..78.87 rows=20 width=16) (actual time=7.488..7.607 rows=154 loops=1)

2. 0.185 7.525 ↓ 15.5 310 1

Sort (cost=78.72..78.77 rows=20 width=16) (actual time=7.487..7.525 rows=310 loops=1)

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

Nested Loop (cost=53.54..78.29 rows=20 width=16) (actual time=2.258..7.340 rows=310 loops=1)

4. 1.021 2.553 ↓ 373.7 1,121 1

HashAggregate (cost=53.23..53.26 rows=3 width=8) (actual time=2.001..2.553 rows=1,121 loops=1)

  • Group Key: m.id
5. 0.199 1.532 ↓ 373.7 1,121 1

Nested Loop (cost=45.18..53.22 rows=3 width=8) (actual time=0.223..1.532 rows=1,121 loops=1)

6. 0.008 0.200 ↓ 11.0 11 1

HashAggregate (cost=44.91..44.91 rows=1 width=16) (actual time=0.195..0.200 rows=11 loops=1)

  • Group Key: c.id
7. 0.010 0.192 ↓ 11.0 11 1

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

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

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

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

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

  • Group Key: uzgps_user_access_list.ual_contractid
10. 0.022 0.022 ↓ 3.2 32 1

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

  • Filter: (ual_routing > 0)
11. 1.133 1.133 ↓ 102.0 102 11

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.014..0.103 rows=102 loops=11)

  • Index Cond: ((mo_contract_id = c.id) AND ((mo_status)::text = 'A'::text))
12. 2.242 2.242 ↓ 0.0 0 1,121

Index Scan using uzgps_routing_trip_template_mobject_id_time_start_idx on uzgps_routing_trip_template rtt (cost=0.31..8.33 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=1,121)

  • Index Cond: ((mobject_id = m.id) AND (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': (...)