explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KgUR

Settings
# exclusive inclusive rows x rows loops node
1. 4.278 135.145 ↑ 111.2 52 1

Hash Left Join (cost=1,421.40..1,990.61 rows=5,784 width=32) (actual time=131.557..135.145 rows=52 loops=1)

  • Hash Cond: ((proc_def.deployment_id_)::text = (runtime_app.deployment_id)::text)
  • Join Filter: ((app_relation.metadata)::jsonb @? ((('$.processDefinitions[*].id ? (@ == '::text || (proc_def.id_)::text) || ')'::text))::jsonpath)
  • Rows Removed by Join Filter: 421
  • Filter: (NOT ((COALESCE(((model.model_editor_json)::jsonb #>> '{hidden}'::text[]), 'false'::text))::boolean))
  • Rows Removed by Filter: 11,507
2. 1.253 1.253 ↑ 1.0 11,559 1

Seq Scan on act_re_procdef proc_def (cost=0.00..525.69 rows=11,569 width=42) (actual time=0.007..1.253 rows=11,559 loops=1)

3. 0.031 129.614 ↓ 65.0 65 1

Hash (cost=1,421.39..1,421.39 rows=1 width=105) (actual time=129.614..129.614 rows=65 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 21kB
4. 0.066 129.583 ↓ 65.0 65 1

Nested Loop (cost=122.02..1,421.39 rows=1 width=105) (actual time=114.798..129.583 rows=65 loops=1)

5. 5.539 123.537 ↓ 65.0 65 1

Hash Join (cost=121.73..1,379.48 rows=1 width=125) (actual time=114.790..123.537 rows=65 loops=1)

  • Hash Cond: (app_relation.model_id = model_history.id)
6. 3.565 3.565 ↑ 1.0 37,217 1

Seq Scan on app_relation (cost=0.00..1,118.17 rows=37,217 width=102) (actual time=0.004..3.565 rows=37,217 loops=1)

7. 0.074 114.433 ↓ 65.0 65 1

Hash (cost=121.72..121.72 rows=1 width=39) (actual time=114.433..114.433 rows=65 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
8. 0.102 114.359 ↓ 65.0 65 1

Nested Loop (cost=4.10..121.72 rows=1 width=39) (actual time=11.401..114.359 rows=65 loops=1)

9. 43.195 105.417 ↓ 65.0 65 1

Nested Loop (cost=3.81..100.84 rows=1 width=43) (actual time=10.809..105.417 rows=65 loops=1)

  • Join Filter: ((runtime_app.app_definition)::jsonb @? ((('$.models[*].id ? (@ == '::text || (model.id)::text) || ')'::text))::jsonpath)
  • Rows Removed by Join Filter: 3,561
10. 61.634 61.634 ↑ 1.0 98 1

Seq Scan on model (cost=0.00..40.49 rows=98 width=13) (actual time=10.476..61.634 rows=98 loops=1)

  • Filter: (model_type = 0)
  • Rows Removed by Filter: 243
11. 0.384 0.588 ↓ 7.4 37 98

Materialize (cost=3.81..43.22 rows=5 width=433) (actual time=0.001..0.006 rows=37 loops=98)

12. 0.024 0.204 ↓ 7.4 37 1

Hash Join (cost=3.81..43.19 rows=5 width=433) (actual time=0.050..0.204 rows=37 loops=1)

  • Hash Cond: (app_model.id = runtime_app.model_id)
13. 0.148 0.148 ↑ 1.0 45 1

Seq Scan on model app_model (cost=0.00..39.26 rows=45 width=12) (actual time=0.009..0.148 rows=45 loops=1)

  • Filter: (model_type = 3)
  • Rows Removed by Filter: 296
14. 0.013 0.032 ↓ 1.0 37 1

Hash (cost=3.36..3.36 rows=36 width=421) (actual time=0.032..0.032 rows=37 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 24kB
15. 0.019 0.019 ↓ 1.0 37 1

Seq Scan on runtime_app_def runtime_app (cost=0.00..3.36 rows=36 width=421) (actual time=0.006..0.019 rows=37 loops=1)

16. 8.840 8.840 ↑ 1.0 1 65

Index Scan using idx_proc_mod_history_proc on model_history (cost=0.29..20.87 rows=1 width=20) (actual time=0.134..0.136 rows=1 loops=65)

  • Index Cond: (model_id = model.id)
  • Filter: ((model.version - 1) = version)
  • Rows Removed by Filter: 129
17. 5.980 5.980 ↑ 1.0 1 65

Index Scan using idx_proc_mod_history_proc on model_history app_model_history (cost=0.29..41.90 rows=1 width=12) (actual time=0.080..0.092 rows=1 loops=65)

  • Index Cond: (model_id = app_model.id)
  • Filter: ((app_model.version - 1) = version)
  • Rows Removed by Filter: 189
Planning time : 3.530 ms
Execution time : 135.421 ms