Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address limitations with FHIR search in citus #3843

Open
punktilious opened this issue Aug 5, 2022 · 0 comments
Open

Address limitations with FHIR search in citus #3843

punktilious opened this issue Aug 5, 2022 · 0 comments
Labels
bug Something isn't working P3 Priority 3 - Nice To Have

Comments

@punktilious
Copy link
Collaborator

Describe the bug
In Citus we distribute resource and parameter tables using logical_resource_id. All joins between tables must therefore include logical_resource_id in the join predicate.

Certain search queries which require a join to connect between two resources currently do not work and will result in a SQLException thrown by Citus. These include:

  • _include
  • _revinclude
  • _has

Environment
Which version of IBM FHIR Server? 5.0.0-SNAPSHOT

To Reproduce
Steps to reproduce the behavior:

  1. Configure a tenant using citus
  2. Load test data
  3. Attempt a search using '_include', '_revinclude' or '_has'
  4. See error

Expected behavior
The search should complete successfully.

Additional context
It may be possible to use common table expression (CTE) queries for which Citus will fetch the data first then distribute the results to each node as required so that they can be used in-line with rest of the query. This can be effective if the result set is small (performance). There are also limits to the result set size (although this is configurable).

The _include and _revinclude queries are probably the simplest to address because we already break down processing to fetch rows for individual reference links then iterate using multiple queries.

@punktilious punktilious added the bug Something isn't working label Aug 5, 2022
@lmsurpre lmsurpre added the P3 Priority 3 - Nice To Have label Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3 Priority 3 - Nice To Have
Projects
None yet
Development

No branches or pull requests

2 participants