explain.depesz.com

PostgreSQL's explain analyze made readable

Result: of9 : Optimization for: plan #ro9I

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 36.699 ↓ 0.0 0 1

Update on import_vn.observations_json (cost=1.16..80.62 rows=84 width=1,028) (actual time=36.699..36.699 rows=0 loops=1)

2. 36.565 36.565 ↑ 21.0 4 1

Nested Loop (cost=1.16..80.62 rows=84 width=1,028) (actual time=36.554..36.565 rows=4 loops=1)

3. 36.480 36.480 ↑ 1.0 1 1

HashAggregate (cost=0.72..0.73 rows=1 width=96) (actual time=36.479..36.480 rows=1 loops=1)

4. 36.471 36.471 ↑ 1.0 1 1

Subquery Scan on ANY_subquery (cost=0.42..0.72 rows=1 width=96) (actual time=36.468..36.471 rows=1 loops=1)

5. 36.459 36.459 ↑ 1.0 1 1

Limit (cost=0.42..0.71 rows=1 width=36) (actual time=36.457..36.459 rows=1 loops=1)

6. 36.456 36.456 ↑ 22,191.0 1 1

Index Scan Backward using t_releves_source_id_universal_key on pr_stoc.t_releves (cost=0.42..6,453.81 rows=22,191 width=36) (actual time=36.455..36.456 rows=1 loops=1)

7. 0.054 0.054 ↑ 21.0 4 1

Index Scan using observations_json_id_form_universal_idx on import_vn.observations_json (cost=0.44..79.05 rows=84 width=968) (actual time=0.045..0.054 rows=4 loops=1)

Planning time : 0.298 ms
Execution time : 146.272 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
observations_trigger 1.399 ms 4 0.350 ms
stoc_observation_upsert_from_vn_trigger 9.584 ms 4 2.396 ms
stoc_releve_update_type_eps_from_vn_trigger 98.523 ms 4 24.631 ms