explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u1GN : 234

Settings
# exclusive inclusive rows x rows loops node
1. 0.040 31.345 ↓ 7.7 154 1

Unique (cost=300.92..301.07 rows=20 width=16) (actual time=31.280..31.345 rows=154 loops=1)

2. 0.245 31.305 ↓ 15.5 310 1

Sort (cost=300.92..300.97 rows=20 width=16) (actual time=31.278..31.305 rows=310 loops=1)

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

Nested Loop (cost=57.81..300.49 rows=20 width=16) (actual time=4.070..31.060 rows=310 loops=1)

4. 0.904 4.096 ↓ 373.7 1,121 1

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

  • Group Key: m.id
5. 0.227 3.192 ↓ 373.7 1,121 1

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

6. 0.017 1.359 ↓ 11.0 11 1

HashAggregate (cost=44.91..44.91 rows=1 width=16) (actual time=1.355..1.359 rows=11 loops=1)

  • Group Key: c.id
7. 0.014 1.342 ↓ 11.0 11 1

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

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

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

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

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

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

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

  • Filter: (ual_routing > 0)
11. 1.606 1.606 ↓ 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.029..0.146 rows=102 loops=11)

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

Bitmap Heap Scan on uzgps_routing_trip_template rtt (cost=4.58..82.40 rows=1 width=16) (actual time=0.007..0.023 rows=0 loops=1,121)

  • Recheck Cond: (mobject_id = m.id)
  • Filter: ((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'::doubl (...)
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=1870
13. 4.484 4.484 ↑ 5.7 7 1,121

Bitmap Index Scan on uzgps_routing_trip_template_mobject_id_route_id_idx (cost=0.00..4.58 rows=40 width=0) (actual time=0.004..0.004 rows=7 loops=1,121)

  • Index Cond: (mobject_id = m.id)