explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g4FP : Optimization for: Optimization for: Optimization for: plan #ro9I; plan #of9; plan #fuCI

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 196.725 469.325 ↓ 0.0 0 1

Update on import_vn.observations_json (cost=304.17..79,210.35 rows=84,241 width=1,028) (actual time=469.325..469.325 rows=0 loops=1)

2. 79.611 79.611 ↑ 8.0 10,551 1

Nested Loop (cost=304.17..79,210.35 rows=84,241 width=1,028) (actual time=39.719..79.611 rows=10,551 loops=1)

3. 40.688 40.688 ↑ 1.0 1,000 1

HashAggregate (cost=303.73..313.73 rows=1,000 width=96) (actual time=39.679..40.688 rows=1,000 loops=1)

4. 39.345 39.345 ↑ 1.0 1,000 1

Subquery Scan on ANY_subquery (cost=0.42..301.23 rows=1,000 width=96) (actual time=38.068..39.345 rows=1,000 loops=1)

5. 39.024 39.024 ↑ 1.0 1,000 1

Limit (cost=0.42..291.23 rows=1,000 width=36) (actual time=38.054..39.024 rows=1,000 loops=1)

6. 38.932 38.932 ↑ 22.2 1,000 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=38.051..38.932 rows=1,000 loops=1)

7. 35.000 35.000 ↑ 7.6 11 1,000

Index Scan using observations_json_id_form_universal_idx on import_vn.observations_json (cost=0.44..78.06 rows=84 width=968) (actual time=0.011..0.035 rows=11 loops=1,000)

Planning time : 0.410 ms
Execution time : 254,624.921 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
observations_trigger 3,477.354 ms 10551 0.330 ms
stoc_observation_upsert_from_vn_trigger 7,999.025 ms 10551 0.758 ms
stoc_releve_update_type_eps_from_vn_trigger 242,666.486 ms 10551 22.999 ms