Improving the performance of Patient Search

I would like some advice on how to improve the performance of patient search, I have looked over the recommendations at https://wiki.openmrs.org/display/docs/Performance+Tuning and have done:

  1. Disabled Identifier regex but maintained identifier perfix and suffixes as % since the identifiers may not be known

  2. Anyone with a clearer explanation for:

  • searchWidget.batchSize - what does this do since only 10 are shown per page
  • searchWidget.maximumResults - is this the maximum returned for all the queries using LIMIT?

as they are not clear to me at this point

  1. The search widget seems to be hardcoded to start searching after 3 characters, is there any way this can be increased to a higher number to improve the performance of the queries? Are these related to coreapps.searchDelayShort and coreapps.searchDelayLong?

What is your value for? search.caseSensitiveDatabaseStringComparison

That is true because we need it.

On further investigation I think I have found a bug in the search widget - the minSearchCharacters value from the Global Property is being ignored - so will need to fix that.

However I still do not understand what searchWidget.batchSize and searchWidget.maximumResults do

Issue: https://issues.openmrs.org/browse/RA-1575

PR: https://github.com/openmrs/openmrs-module-coreapps/pull/173

  1. The value is set to true which the client wants

  2. The names and identifiers also have % matching on both ends to support partial matching

Just for troubleshooting purposes, does setting search.caseSensitiveDatabaseStringComparison to false fix the performance problem?