explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FTGo

Settings
# exclusive inclusive rows x rows loops node
1. 1.019 184.892 ↓ 8,465.0 8,465 1

Nested Loop (cost=0.29..6,097.03 rows=1 width=133) (actual time=36.553..184.892 rows=8,465 loops=1)

2. 4.939 130.173 ↓ 488.2 10,740 1

Nested Loop (cost=0.00..5,920.49 rows=22 width=141) (actual time=0.070..130.173 rows=10,740 loops=1)

3. 0.862 28.331 ↓ 489.4 10,767 1

Append (cost=0.00..5,465.76 rows=22 width=133) (actual time=0.035..28.331 rows=10,767 loops=1)

4. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on resource_index sv (cost=0.00..0.00 rows=1 width=104) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((type = ANY ('{CarePlan}'::text[])) AND (materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]) AND (fhir_core_code_search._search_token_code('status'::text, search_value) = 'active'::text))
5. 0.014 0.014 ↓ 0.0 0 1

Index Scan using _indx_stock_singl_index_type on stock_resource_index sv_1 (cost=0.29..135.10 rows=1 width=129) (actual time=0.013..0.014 rows=0 loops=1)

  • Index Cond: (type = ANY ('{CarePlan}'::text[]))
  • Filter: ((materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]) AND (fhir_core_code_search._search_token_code('status'::text, search_value) = 'active'::text))
6. 27.452 27.452 ↓ 538.4 10,767 1

Index Scan using _indx_careplan_index_search_status_code on careplan_index sv_2 (cost=0.29..5,330.66 rows=20 width=135) (actual time=0.019..27.452 rows=10,767 loops=1)

  • Index Cond: (fhir_core_code_search._search_token_code('status'::text, search_value) = 'active'::text)
  • Filter: ((type = ANY ('{CarePlan}'::text[])) AND (materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]))
  • Rows Removed by Filter: 8532
7. 10.767 96.903 ↑ 3.0 1 10,767

Append (cost=0.00..20.64 rows=3 width=16) (actual time=0.009..0.009 rows=1 loops=10,767)

8. 0.000 0.000 ↓ 0.0 0 10,767

Seq Scan on resource_edge re2 (cost=0.00..0.00 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=10,767)

  • Filter: ((source_type = ANY ('{CarePlan}'::text[])) AND (materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]) AND (path = 'assessment'::text) AND (sv.content_pid = start_vertex))
9. 10.767 10.767 ↓ 0.0 0 10,767

Index Scan using stock_resource_edge_start_vertex_idx on stock_resource_edge re2_1 (cost=0.29..7.77 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=10,767)

  • Index Cond: (start_vertex = sv.content_pid)
  • Filter: ((source_type = ANY ('{CarePlan}'::text[])) AND (materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]) AND (path = 'assessment'::text))
10. 75.369 75.369 ↑ 1.0 1 10,767

Index Scan using careplan_edge_start_vertex_end_vertex_path_materialized_pat_idx on careplan_edge re2_2 (cost=0.55..12.87 rows=1 width=16) (actual time=0.007..0.007 rows=1 loops=10,767)

  • Index Cond: ((start_vertex = sv.content_pid) AND (path = 'assessment'::text))
  • Filter: ((source_type = ANY ('{CarePlan}'::text[])) AND (materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]))
11. 53.700 53.700 ↑ 1.0 1 10,740

Index Scan using _indx_riskassessment_single_content_pid on riskassessment_index sv2_1 (cost=0.29..8.01 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=10,740)

  • Index Cond: (content_pid = re2.end_vertex)
  • Filter: ((materialized_path ? '{org.common.*,org.2267490707683935235.unpartitioned.*,org.2267490707683935235.*}'::lquery[]) AND (fhir_core_code_search._search_token_code('status'::text, search_value) = 'final'::text))
  • Rows Removed by Filter: 0
Planning time : 2.425 ms
Execution time : 185.225 ms