Module: Queue
Module Version: 2.9.0
System Version: Version: 2.7.7 Build 0
Issue or Question: We recently started using service queues and noticed an issue with performance. The queries would take a long time sometimes to return data despite the fact that the queue_entry table had less than 50 rows. I looked at the query generated when fetching the queue entry data and it was 800+ lines, with the table doing 30+ joins. Is it possible to optimize this module for better performance ?
API Endpoint when fetching queues :
`https://{{base_url}}/openmrs/ws/rest/v1/queue-entry?v=custom:(uuid,display,queue,status,patient:(uuid,display,person,identifiers:(uuid,display,identifier,identifierType)),visit:(uuid,display,startDatetime,encounters:(uuid,display,diagnoses,encounterDatetime,encounterType,obs,encounterProviders,voided),attributes:(uuid,display,value,attributeType)),priority,priorityComment,sortWeight,startedAt,endedAt,locationWaitingFor,queueComingFrom,providerWaitingFor,previousQueueEntry)&totalCount=true&isEnded=false&location=08feae7c-1352-11df-a1f1-0026b9348838`
Should i also share the query? Its very long.
Kindly assist @dkayiwa