explain.depesz.com

A tool for finding a real cause for slow queries.

Result: BLk

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 57.096 10,684.798 ↓ 16,400.6 82,003 1

Nested Loop Semi Join (cost=543,422.34..571,013.45 rows=5 width=4) (actual time=5,854.267..10,684.798 rows=82,003 loops=1)

  • Join Filter: (root.feature_mapping_id = anodeid.parent_feature_mapping_id)
2. 56.036 5,953.531 ↓ 6,833.6 82,003 1

Merge Join (cost=543,422.34..543,426.29 rows=12 width=24) (actual time=5,854.182..5,953.531 rows=82,003 loops=1)

  • Merge Cond: ((root.feature_mapping_id = node1.parent_feature_mapping_id) AND (root.payload_id = node2.payload_id))
3. 119.467 380.707 ↓ 289.8 82,003 1

Sort (cost=1,150.65..1,151.35 rows=283 width=12) (actual time=359.940..380.707 rows=82,003 loops=1)

  • Sort Key: root.feature_mapping_id, root.payload_id
  • Sort Method: external merge Disk: 1768kB
4. 261.240 261.240 ↓ 289.8 82,003 1

Index Scan using path_value_idx on path_value root (cost=0.00..1,139.12 rows=283 width=12) (actual time=0.073..261.240 rows=82,003 loops=1)

  • Index Cond: ((rm_type_name = 'COMPOSITION'::text) AND (feature_name = 'composition'::text))
5. 122.335 5,516.788 ↓ 332.0 82,003 1

Sort (cost=542,271.69..542,272.31 rows=247 width=12) (actual time=5,494.236..5,516.788 rows=82,003 loops=1)

  • Sort Key: node1.parent_feature_mapping_id, node2.payload_id
  • Sort Method: external sort Disk: 2088kB
6. 68.615 5,394.453 ↓ 332.0 82,003 1

HashAggregate (cost=542,259.40..542,261.87 rows=247 width=12) (actual time=5,377.761..5,394.453 rows=82,003 loops=1)

7. 183.712 5,325.838 ↓ 136.1 164,004 1

Hash Semi Join (cost=506,297.37..542,253.38 rows=1,205 width=12) (actual time=2,788.758..5,325.838 rows=164,004 loops=1)

  • Hash Cond: ((node1.payload_id = node2.payload_id) AND (node1.feature_mapping_id = node2.parent_feature_mapping_id))
8. 2,354.833 2,430.473 ↓ 99.8 246,005 1

Bitmap Heap Scan on path_value node1 (cost=77.61..9,421.62 rows=2,464 width=12) (actual time=76.628..2,430.473 rows=246,005 loops=1)

  • Recheck Cond: ((rm_type_name = 'CONTENTITEM'::text) AND (feature_name = 'content'::text))
9. 75.640 75.640 ↓ 99.8 246,005 1

Bitmap Index Scan on path_value_idx (cost=0.00..77.00 rows=2,464 width=0) (actual time=75.640..75.640 rows=246,005 loops=1)

  • Index Cond: ((rm_type_name = 'CONTENTITEM'::text) AND (feature_name = 'content'::text))
10. 104.186 2,711.653 ↓ 1.0 410,015 1

Hash (cost=498,674.38..498,674.38 rows=399,092 width=8) (actual time=2,711.653..2,711.653 rows=410,015 loops=1)

  • Buckets: 4096 Batches: 16 Memory Usage: 1013kB
11. 2,537.833 2,607.467 ↓ 1.0 410,015 1

Bitmap Heap Scan on path_value node2 (cost=10,345.32..498,674.38 rows=399,092 width=8) (actual time=71.718..2,607.467 rows=410,015 loops=1)

  • Recheck Cond: (rm_type_name = 'ITEMSTRUCTURE'::text)
12. 69.634 69.634 ↓ 1.0 410,015 1

Bitmap Index Scan on path_value_idx (cost=0.00..10,245.55 rows=399,092 width=0) (actual time=69.634..69.634 rows=410,015 loops=1)

  • Index Cond: (rm_type_name = 'ITEMSTRUCTURE'::text)
13. 4,674.171 4,674.171 ↑ 1.0 1 82,003

Index Scan using path_value_idx2 on path_value anodeid (cost=0.00..2,298.91 rows=1 width=8) (actual time=0.057..0.057 rows=1 loops=82,003)

  • Index Cond: (payload_id = node2.payload_id)
  • Filter: ((feature_name = 'archetypeNodeId'::text) AND (val_string = 'openEHR-EHR-COMPOSITION.discharge.v1'::text))