explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bBa6

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 18.582 24.507 ↓ 0.0 0 1

Update on import_vn.observations_json (cost=34.14..78,940.32 rows=86,051 width=1,000) (actual time=24.506..24.507 rows=0 loops=1)

2. 2.358 2.358 ↑ 86.0 1,001 1

Nested Loop (cost=34.14..78,940.32 rows=86,051 width=1,000) (actual time=0.895..2.358 rows=1,001 loops=1)

3. 0.926 0.926 ↑ 12.5 80 1

HashAggregate (cost=33.70..43.70 rows=1,000 width=40) (actual time=0.879..0.926 rows=80 loops=1)

4. 0.681 0.681 ↑ 1.0 1,000 1

Subquery Scan on ANY_subquery (cost=0.44..31.20 rows=1,000 width=40) (actual time=0.021..0.681 rows=1,000 loops=1)

5. 0.459 0.459 ↑ 1.0 1,000 1

Limit (cost=0.44..21.20 rows=1,000 width=8) (actual time=0.014..0.459 rows=1,000 loops=1)

6. 0.381 0.381 ↑ 1,762.8 1,000 1

Index Only Scan using observations_json_id_form_universal_idx on import_vn.observations_json observations_json_1 (cost=0.44..36,602.88 rows=1,762,825 width=8) (actual time=0.013..0.381 rows=1,000 loops=1)

7. 1.120 1.120 ↑ 6.5 13 80

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.007..0.014 rows=13 loops=80)

Planning time : 0.530 ms
Execution time : 55,278.369 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
observations_trigger 566.182 ms 1001 0.566 ms
obsfull_upsert_from_vn_trigger 2,699.160 ms 1001 2.696 ms
stoc_observation_upsert_from_vn_trigger 31,322.412 ms 1001 31.291 ms
stoc_releve_update_type_eps_from_vn_trigger 20,663.544 ms 1001 20.643 ms