-
Notifications
You must be signed in to change notification settings - Fork 295
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
Bypass join to TokenIndexEntity
table for SearchParameter _id
#2721
Comments
TokenIndexEntity
table for SearchParameter [_id](https://build.fhir.org/search.html#_id)TokenIndexEntity
table for SearchParameter _id
Thanks for raising this @LZRS. This is a valid request. However the SQL generation logic in engine library is generic to deal with all kinds of keys. Let us evaluate if this is possible. @jingtang10 @aditya-07 |
Yeah, that would work although we have some usecases that would require Search DSL, for example getting Patient's Observations and Conditions using revInclude Example
|
Is your feature request related to a problem? Please describe.
Searching for resources given multiple ids with filter
_id
, does a join to theTokenIndexEntity
, that may seem to incur an extra performance costDescribe the solution you'd like
When search is done using filter in the form
the query generated is of the form of
The suggestion we had was if we could bypass joining to the
TokenIndexEntity
table for the_id
, and instead filter directly from theResourceEntity
table.The resulting query would therefore look similar to
Additional context
Link to
RES_ID
constantDescribe alternatives you've considered
Enhancing the
fhirEngine.get
interface to support multipleresourceId
to fetch multiple resources, although this wouldn't work with the rest of the Search DSLWould you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.
The text was updated successfully, but these errors were encountered: