Delay in listing resources in the Medplum API (Ove...
# support
a
Good afternoon everybody! We are experiencing a slowdown in retrieving and listing FHIR resources in the Medplum API. The searches and filters are fast, which is good! However, when we list all the records, there is a delay of approximately 1 minute when we have millions of records (in this specific case, approximately 9 million). When we researched a little about the delay, we realized that the total records count query is taking a long time to fully scan the resource database. Has anyone ever experienced this? Did you find something that made this list of resources in the Medplum API more performant? I hope you help me! A hug to everyone! Yours sincerely; Adriano Freitas.
r
Hi @Adriano Freitas , this is a known performance bottle neck with postgres. In Release 3.0.2, we updated the Medplum App to use estimated counts by default (https://github.com/medplum/medplum/pull/3840)
This has significantly better performance. If you upgrade your app, you should be able to see the changes reflected
a
Great @rahul1 ! So does this mean that if we update to this TAG this problem no longer occurs? Thank you very much!
r
yes that should be the case
This will be at the expense of having fully accurate counts - these counts will now be estimated
a
Hi @rahul1 Just a small question after the update: Would the estimated number be just the pagination? Will the correct total number no longer be counted?
r
Hi @Adriano Freitas , this is just temporary. We have an open issue to bring back the total counts: https://github.com/orgs/medplum/projects/1/views/14?pane=issue&itemId=54692834
a
Thank you very much for clarifying! Thank you @rahul1 for your quick response. You are always working! 😆
134 Views