Improve performance of ResourceSearchView (use hfj_resource res_id instead of hfj_res_ver res_id when querying by resource pids) (#4716)
* Improve performance of ResourceSearchView (use hfj_resource res_id instead of hfj_res_ver res_id when querying by resource pids) * Add changelog and credit --------- Co-authored-by: Primož Delopst <primoz.delopst@better.care> Co-authored-by: James Agnew <jamesagnew@gmail.com>
This commit is contained in:
parent
fa00ef23e2
commit
49a39c195c
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
type: perf
|
||||||
|
issue: 4716
|
||||||
|
title: "The SQL query used to fetch pages of search results resulted in an inefficient use
|
||||||
|
of the database in cases where resources have many different versions stored. Thanks to
|
||||||
|
Primož Delopst for the pull request!"
|
|
@ -46,7 +46,7 @@ import java.util.Date;
|
||||||
@Entity
|
@Entity
|
||||||
@Immutable
|
@Immutable
|
||||||
@Subselect("SELECT h.pid as pid, " +
|
@Subselect("SELECT h.pid as pid, " +
|
||||||
" h.res_id as res_id, " +
|
" r.res_id as res_id, " +
|
||||||
" h.res_type as res_type, " +
|
" h.res_type as res_type, " +
|
||||||
" h.res_version as res_version, " + // FHIR version
|
" h.res_version as res_version, " + // FHIR version
|
||||||
" h.res_ver as res_ver, " + // resource version
|
" h.res_ver as res_ver, " + // resource version
|
||||||
|
|
Loading…
Reference in New Issue