explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rrxE

Settings
# exclusive inclusive rows x rows loops node
1. 0.415 13.982 ↓ 29.0 29 1

WindowAgg (cost=69.57..69.97 rows=1 width=837) (actual time=13.665..13.982 rows=29 loops=1)

2. 0.068 13.567 ↓ 29.0 29 1

Sort (cost=69.57..69.57 rows=1 width=487) (actual time=13.565..13.567 rows=29 loops=1)

  • Sort Key: snapshot_scheduled_inspection.project_id, (_st_distance(location.geo_point, '0101000020E61000000000002098CF4240000000609AE94B40'::geography, '0'::double precision, true))
  • Sort Method: quicksort Memory: 41kB
3. 0.422 13.499 ↓ 29.0 29 1

Nested Loop (cost=2.28..69.56 rows=1 width=487) (actual time=3.378..13.499 rows=29 loops=1)

4. 0.046 12.352 ↓ 29.0 29 1

Nested Loop (cost=1.84..60.85 rows=1 width=358) (actual time=3.015..12.352 rows=29 loops=1)

5. 0.041 12.248 ↓ 29.0 29 1

Nested Loop (cost=1.70..52.62 rows=1 width=295) (actual time=3.000..12.248 rows=29 loops=1)

6. 0.081 11.656 ↓ 29.0 29 1

Nested Loop (cost=1.27..35.39 rows=1 width=267) (actual time=2.723..11.656 rows=29 loops=1)

  • Join Filter: (snapshot_scheduled_inspection.planned_work_status_id = planned_work_status.id)
  • Rows Removed by Join Filter: 140
7. 0.046 11.517 ↓ 29.0 29 1

Nested Loop (cost=1.27..34.19 rows=1 width=235) (actual time=2.708..11.517 rows=29 loops=1)

8. 0.052 3.786 ↓ 29.0 29 1

Nested Loop (cost=0.85..25.75 rows=1 width=145) (actual time=2.420..3.786 rows=29 loops=1)

9. 3.618 3.618 ↓ 29.0 29 1

Index Scan using snapshot_scheduled_inspection_actor_id_project_id_visible_id_ac on snapshot_scheduled_inspection (cost=0.41..17.30 rows=1 width=69) (actual time=2.395..3.618 rows=29 loops=1)

  • Index Cond: ((actor_id = '-1'::integer) AND (project_id = ANY ('{100175,156641,159370}'::integer[])) AND (visible_id = 1) AND (actuality = 0))
10. 0.116 0.116 ↑ 1.0 1 29

Index Scan using control_object_pkey on control_object (cost=0.43..8.45 rows=1 width=80) (actual time=0.004..0.004 rows=1 loops=29)

  • Index Cond: (id = snapshot_scheduled_inspection.control_object_id)
11. 7.685 7.685 ↑ 1.0 1 29

Index Scan using control_subject_pkey on control_subject (cost=0.42..8.44 rows=1 width=94) (actual time=0.265..0.265 rows=1 loops=29)

  • Index Cond: (id = snapshot_scheduled_inspection.control_subject_id)
12. 0.058 0.058 ↑ 1.5 6 29

Seq Scan on planned_work_status (cost=0.00..1.09 rows=9 width=36) (actual time=0.002..0.002 rows=6 loops=29)

13. 0.551 0.551 ↑ 1.0 1 29

Index Scan using location_pkey on location (cost=0.43..8.83 rows=1 width=36) (actual time=0.019..0.019 rows=1 loops=29)

  • Index Cond: (id = snapshot_scheduled_inspection.location_id)
  • Filter: ((geo_point && '0101000020E61000000000002098CF4240000000609AE94B40'::geography) AND ('0101000020E61000000000002098CF4240000000609AE94B40'::geography && _st_expand(geo_point, '36110'::double precision)) AND _st_dwithin(geo_point, '0101000020E61000000000002098CF4240000000609AE94B40'::geography, '36110'::double precision, true))
14. 0.058 0.058 ↑ 1.0 1 29

Index Scan using stage_pkey on stage (cost=0.15..8.17 rows=1 width=71) (actual time=0.002..0.002 rows=1 loops=29)

  • Index Cond: (id = snapshot_scheduled_inspection.stage_id)
  • Filter: ((kind = 0) AND (status_stage_id = 2))
15. 0.725 0.725 ↑ 1.0 1 29

Index Scan using execution_pkey on execution (cost=0.44..8.46 rows=1 width=125) (actual time=0.025..0.025 rows=1 loops=29)

  • Index Cond: (id = snapshot_scheduled_inspection.execution_id)
Planning time : 5.007 ms
Execution time : 14.198 ms