We are experience slow audit queries via the /alfresco/service/api/audit/query API with the following command:
curl -u admin:admin "http://localhost:8080/alfresco/service/api/audit/query/alfresco-access?verbose=true&forward=false&limit=0"
We have been trying to identify where the problems lie and the initial database query on alf_audit_app, alf_audit_entry etc seem to run pretty quickly.
Although we are not sure whether this is the problem or not when querying a test instance we are getting 3541 audit entries returned in 19 seconds but the alfresco log file has 48415 entries for the following query.
15:44:25,627 DEBUG [java.sql.PreparedStatement] ==> Executing: select * from alf_prop_class where id = ?