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

Improve FHIR Search Count Performance #1466

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Conversation

alexanderkiel
Copy link
Member

@alexanderkiel alexanderkiel commented Feb 4, 2024

FHIR Search queries using _summary=count with a single search parameter are already fast. On a properly spaced system about 2 million resources can be counted per second.

However, if the FHIR search query contains more than one search parameter, the performance was about 10 times slower.

With this PR, the performance will be on the same level as for queries with a single search parameter. This is achieved by parallelise also such queries.

@alexanderkiel alexanderkiel self-assigned this Feb 4, 2024
@alexanderkiel alexanderkiel added module:db performance Performance improvement labels Feb 4, 2024
@alexanderkiel alexanderkiel added this to the v0.24.0 milestone Feb 4, 2024
@alexanderkiel alexanderkiel changed the title Parallelize Count with Multiple Clauses Improve FHIR Search Count Performance Feb 4, 2024
Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (c06ca74) 95.85% compared to head (9b05ebe) 95.85%.
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1466      +/-   ##
===========================================
- Coverage    95.85%   95.85%   -0.01%     
===========================================
  Files          245      245              
  Lines        15836    15834       -2     
  Branches       335      335              
===========================================
- Hits         15180    15177       -3     
- Misses         321      322       +1     
  Partials       335      335              
Files Coverage Δ
modules/db/src/blaze/db/impl/search_param.clj 100.00% <100.00%> (ø)
...ules/db/src/blaze/db/impl/search_param/chained.clj 100.00% <100.00%> (ø)
.../db/impl/search_param/composite/token_quantity.clj 97.05% <100.00%> (ø)
...aze/db/impl/search_param/composite/token_token.clj 100.00% <100.00%> (ø)
modules/db/src/blaze/db/impl/search_param/date.clj 98.38% <100.00%> (ø)
modules/db/src/blaze/db/impl/search_param/has.clj 100.00% <100.00%> (ø)
modules/db/src/blaze/db/impl/search_param/list.clj 100.00% <100.00%> (ø)
...dules/db/src/blaze/db/impl/search_param/number.clj 100.00% <100.00%> (ø)
...les/db/src/blaze/db/impl/search_param/quantity.clj 96.42% <100.00%> (ø)
...dules/db/src/blaze/db/impl/search_param/string.clj 96.49% <100.00%> (ø)
... and 4 more

... and 1 file with indirect coverage changes

@alexanderkiel alexanderkiel merged commit 7db50e7 into develop Feb 4, 2024
134 of 135 checks passed
@alexanderkiel alexanderkiel deleted the parallel-count branch February 4, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:db performance Performance improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant