explain.depesz.com

PostgreSQL's explain analyze made readable

Result: plAxt

Settings
# exclusive inclusive rows x rows loops node
1. 0.661 2.290 ↓ 29.0 29 1

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

2. 0.054 1.629 ↓ 29.0 29 1

Sort (cost=69.57..69.57 rows=1 width=487) (actual time=1.627..1.629 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.221 1.575 ↓ 29.0 29 1

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

4. 0.019 1.122 ↓ 29.0 29 1

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

5. 0.028 1.045 ↓ 29.0 29 1

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

6. 0.066 0.640 ↓ 29.0 29 1

Nested Loop (cost=1.27..35.39 rows=1 width=267) (actual time=0.085..0.640 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.032 0.545 ↓ 29.0 29 1

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

8. 0.033 0.223 ↓ 29.0 29 1

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

9. 0.103 0.103 ↓ 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.031..0.103 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.290 0.290 ↑ 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.010..0.010 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.377 0.377 ↑ 1.0 1 29

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

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

  • Index Cond: (id = snapshot_scheduled_inspection.execution_id)
Planning time : 4.572 ms
Execution time : 2.606 ms