Stream: dotnet
Topic: Search operation is slow
Santosh Jami (Sep 28 2017 at 21:58):
I am using standard Search operation, with Fhir Client.I am doing the search on the "identifier". I see the search operation is very slow, takes approx 3-4 seconds. There are around 100 resources on the server, so very less load as well. Here is my search:
var searchParams = new SearchParams().Add("identifier", encounterId)
.OrderBy("_lastUpdated", SortOrder.Descending);
var encounterSearchEntry = fhirClient.Search<Encounter>(searchParams).Entry.FirstOrDefault();
Thoughts on this? I am using DSTU2 / Spark
Santosh Jami (Sep 28 2017 at 23:13):
When I do .Read / .Update operation, it is very quick. So, is it standard that .Search() takes long time or any changes needs to be done to address this. Also the Encounter that I am trying to retrieve, I do have the logical Id to this as I created this entry.
Brian Postlethwaite (Oct 02 2017 at 02:12):
Sounds like a server issue, not a fhir client issue.
Many of the other reference implementations are not that slow.
Michel Rutten (Oct 02 2017 at 13:06):
Hi @Santosh Jami, please be aware that we originally developed Spark server as a reference implementation to test the FHIR spec. The Spark implementation has not been optimized for performance.
We no longer actively maintain nor support Spark server. Spark server is obsolete and superceded by our new Vonk FHIR server, which has been specifically developed for production use, with improved reliability and performance. For example, Vonk server supports dynamic runtime configuration of search parameters with automatic (re-)indexing, for optimal search performance.
Santosh Jami (Oct 02 2017 at 16:02):
Sure @Michel Rutten I will evaluate Vonk server, and hope I would see improved performance for search queries as you suggested.
Santosh Jami (Oct 03 2017 at 18:21):
Sounds like a server issue, not a fhir client issue.
Many of the other reference implementations are not that slow.
Thanks @Brian Postlethwaite Increased server resources didn't make a difference. Do we need to do any indexing on mongodb?
Christiaan Knaap (Oct 03 2017 at 19:27):
That is very likely. Because Spark was not intended for production loads, database indexes have not been optimized.
Santosh Jami (Oct 04 2017 at 15:44):
Thanks @Christiaan Knaap . That's what @Michel Rutten also mentioned.
Last updated: Apr 12 2022 at 19:14 UTC