explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hxZB

Settings
# exclusive inclusive rows x rows loops node
1. 0.171 2,375.457 ↓ 2.0 2 1

Nested Loop (cost=307.47..2,849.17 rows=1 width=28) (actual time=588.354..2,375.457 rows=2 loops=1)

  • Join Filter: (runtime_app.model_id = app_model.id)
2. 1,749.974 2,374.929 ↓ 7.0 7 1

Nested Loop (cost=307.19..2,848.84 rows=1 width=48) (actual time=588.254..2,374.929 rows=7 loops=1)

  • Join Filter: ((app_relation.metadata)::jsonb @? ((('$.processDefinitions[*].id ? (@ == '::text || (proc_def.id_)::text) || ')'::text))::jsonpath)
  • Rows Removed by Join Filter: 110222
3. 45.406 400.255 ↓ 7.0 7 1

Hash Join (cost=307.19..1,773.51 rows=1 width=112) (actual time=386.227..400.255 rows=7 loops=1)

  • Hash Cond: (app_relation.model_id = model_history.id)
4. 48.881 48.881 ↓ 1.0 43,597 1

Seq Scan on app_relation (cost=0.00..1,302.86 rows=43,586 width=100) (actual time=0.025..48.881 rows=43,597 loops=1)

5. 0.076 305.968 ↓ 7.0 7 1

Hash (cost=307.18..307.18 rows=1 width=28) (actual time=305.966..305.968 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.147 305.892 ↓ 7.0 7 1

Nested Loop (cost=64.74..307.18 rows=1 width=28) (actual time=39.369..305.892 rows=7 loops=1)

7. 280.168 305.388 ↓ 7.0 7 1

Nested Loop (cost=64.45..290.96 rows=1 width=32) (actual time=39.282..305.388 rows=7 loops=1)

  • Join Filter: ((runtime_app.app_definition)::jsonb @? ((('$.models[*].id ? (@ == '::text || (model.id)::text) || ')'::text))::jsonpath)
  • Rows Removed by Join Filter: 9415
8. 0.268 2.918 ↓ 7.0 7 1

Nested Loop (cost=64.45..88.86 rows=1 width=451) (actual time=1.578..2.918 rows=7 loops=1)

9. 0.175 2.520 ↓ 6.5 13 1

Nested Loop (cost=64.30..88.53 rows=2 width=12) (actual time=1.560..2.520 rows=13 loops=1)

10. 0.629 2.111 ↓ 6.5 13 1

Bitmap Heap Scan on model_history processDefinition_deployedApplication (cost=64.01..71.92 rows=2 width=8) (actual time=1.521..2.111 rows=13 loops=1)

  • Recheck Cond: ((name)::text ~~* '%test rela%'::text)
  • Rows Removed by Index Recheck: 8
  • Heap Blocks: exact=14
11. 1.482 1.482 ↓ 10.5 21 1

Bitmap Index Scan on idx_model_history_name (cost=0.00..64.01 rows=2 width=0) (actual time=1.481..1.482 rows=21 loops=1)

  • Index Cond: ((name)::text ~~* '%test rela%'::text)
12. 0.234 0.234 ↑ 1.0 1 13

Index Scan using pk_model_history on model_history app_model_history (cost=0.29..8.31 rows=1 width=20) (actual time=0.018..0.018 rows=1 loops=13)

  • Index Cond: (id = processDefinition_deployedApplication.id)
13. 0.130 0.130 ↑ 1.0 1 13

Index Scan using uniq_runtime_app_def_model on runtime_app_def runtime_app (cost=0.14..0.16 rows=1 width=439) (actual time=0.010..0.010 rows=1 loops=13)

  • Index Cond: (model_id = app_model_history.model_id)
14. 22.302 22.302 ↑ 1.0 1,346 7

Seq Scan on model (cost=0.00..157.67 rows=1,367 width=12) (actual time=0.008..3.186 rows=1,346 loops=7)

15. 0.357 0.357 ↑ 1.0 1 7

Index Scan using idx_proc_mod_history_proc on model_history (cost=0.29..16.21 rows=1 width=20) (actual time=0.048..0.051 rows=1 loops=7)

  • Index Cond: (model_id = model.id)
  • Filter: ((model.version - 1) = version)
  • Rows Removed by Filter: 3
16. 224.700 224.700 ↑ 1.0 15,747 7

Seq Scan on act_re_procdef proc_def (cost=0.00..641.69 rows=15,769 width=28) (actual time=0.015..32.100 rows=15,747 loops=7)

17. 0.357 0.357 ↓ 0.0 0 7

Index Scan using pk_model on model app_model (cost=0.28..0.31 rows=1 width=12) (actual time=0.051..0.051 rows=0 loops=7)

  • Index Cond: (id = app_model_history.model_id)
  • Filter: (app_model_history.version = (version - 1))
  • Rows Removed by Filter: 1
Planning time : 7.353 ms
Execution time : 2,375.837 ms