explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rwTj : 1

Settings
# exclusive inclusive rows x rows loops node
1. 0.763 2.144 ↓ 29.0 29 1

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

2. 0.078 1.381 ↓ 29.0 29 1

Sort (cost=69.57..69.57 rows=1 width=487) (actual time=1.379..1.381 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.261 1.303 ↓ 29.0 29 1

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

4. 0.019 0.897 ↓ 29.0 29 1

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

5. 0.031 0.820 ↓ 29.0 29 1

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

6. 0.055 0.441 ↓ 29.0 29 1

Nested Loop (cost=1.27..35.39 rows=1 width=267) (actual time=0.076..0.441 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.009 0.357 ↓ 29.0 29 1

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

8. 0.033 0.174 ↓ 29.0 29 1

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

9. 0.054 0.054 ↓ 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=0.021..0.054 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.087 0.087 ↑ 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.003..0.003 rows=1 loops=29)

  • Index Cond: (id = snapshot_scheduled_inspection.control_object_id)
11. 0.174 0.174 ↑ 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.006..0.006 rows=1 loops=29)

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

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

13. 0.348 0.348 ↑ 1.0 1 29

Index Scan using location_pkey on location (cost=0.43..8.83 rows=1 width=36) (actual time=0.012..0.012 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.145 0.145 ↑ 1.0 1 29

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

  • Index Cond: (id = snapshot_scheduled_inspection.execution_id)
Planning time : 3.717 ms
Execution time : 2.393 ms