We noticed that the Bahmni search by identifier is unusably slow in release 0.88. A typical search on around 50k patients took around 30 seconds. The primary cause of this is the % at the beginning of search in the search sql here
Fix - Either upgrade to 0.89 if you can, or patch the line and remove the prefix % (assuming you don’t need to be able to search with a wildcard prefix).
@vinay@angshuonline@arjun We observed the same issue with Bahmni 0.93, especially within the OT module. Searching by patient ID is very slow. Was the fix made here applied to even other modules such as OT and Appointments?
Cc @gsluthra
Hi @rubailly - which version of MySQL are you using with Bahmni? How long does it take now for a patient ID result to show up (and what is the total number of patients in your system)?
Is this the only place in bahmni where patient search is this slow, or are you seeing similar load times for patient ID search in other places… like Registration, Appointment, etc? This will help us understand if its only this API, or something across the board.
Might be a good idea for us to also explore if a DB index on Person ID can help speed up the search response (unless this is a Lucene Index response).
Thanks for these details. Very helpful!
@binduak@gokul - Can you please log an issue in JIRA for this specific investigation (need to check in 0.93 and LATEST).
Hi @rubailly We created the JIRA card and added to the current board to investigate more on the slowness issue with API. We will prioritise this issue in the coming days. Thanks !