explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AMqE

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

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

2. 38.118 38.118 ↑ 21.0 4 1

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

3. 38.061 38.061 ↑ 1.0 1 1

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

4. 38.052 38.052 ↑ 1.0 1 1

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

5. 38.040 38.040 ↑ 1.0 1 1

Limit (cost=0.42..0.71 rows=1 width=36) (actual time=38.038..38.040 rows=1 loops=1)

6. 38.036 38.036 ↑ 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=38.036..38.036 rows=1 loops=1)

7. 0.049 0.049 ↑ 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.028..0.049 rows=4 loops=1)

Planning time : 0.587 ms
Execution time : 467,360.625 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
observations_trigger 1.818 ms 4 0.455 ms
stoc_observation_upsert_from_vn_trigger 467,199.581 ms 4 116,799.895 ms
stoc_releve_update_type_eps_from_vn_trigger 119.116 ms 4 29.779 ms