-
Notifications
You must be signed in to change notification settings - Fork 293
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
Improve FhirEngine Search performance for sorting #2547
Comments
@aditya-07 @MJ1998 here's the ticket about the issue on performance we're experiencing |
Can you tell me how does it perform without filter of active Patients ? |
One improvement I can think of is removing |
It is worth noting that the above latency difference is observable even on non-device sqlite db browsers like SQLiteStudio. |
Removing the subquery that performs this filter has no impact on the performance. |
Removing this does improve the performance as well, executing the query in milliseconds cc LZRS |
thank you very much for catching this @LZRS! very happy for the improvement in @MJ1998 's pr. just one comment for clarification and potential future work: #2553 (comment) |
Describe the bug
When loading around 7k patients ordered by Patient.Name, the db query takes around 25s
Without sorting the query takes around 35ms
This is when using
that generates SQL query
Tested out that removing the
ORDER BY b.index_value ASC
reduces the latency of the query to millisecondsExpected behavior
The usecase of loading resources with sort should be more performant
Additional context
Here's a link to the resources db containing around 7k patients, that can be used for testing
https://drive.google.com/file/d/1TgPw36BFI8BijsUPc1JkQE3l3RXANYzT/view?usp=drive_link
Would 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: