explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 120.716 367.024 ↓ 0.0 0 1

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

2. 67.152 67.152 ↑ 8.0 10,551 1

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

3. 39.726 39.726 ↑ 1.0 1,000 1

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

4. 38.666 38.666 ↑ 1.0 1,000 1

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

5. 38.449 38.449 ↑ 1.0 1,000 1

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

6. 38.315 38.315 ↑ 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=37.850..38.315 rows=1,000 loops=1)

7. 24.000 24.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.009..0.024 rows=11 loops=1,000)

Planning time : 0.411 ms
Execution time : 255,687.327 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
observations_trigger 3,964.862 ms 10551 0.376 ms
stoc_observation_upsert_from_vn_trigger 8,571.825 ms 10551 0.812 ms
stoc_releve_update_type_eps_from_vn_trigger 242,769.569 ms 10551 23.009 ms