Series metadata query very slow even with optimizations

So I follwed the advice in an old conversation to set SeriesMetadata and StudyMetadata in the Config to MainDicomTags. However a query for series/metadata on a CT with 250 images still takes around 7 seconds.
Im using the jodogne/orthanc version with postgresql plugin used for indexing and aws-s3 plugin for storrage. I looked in the verbose log and it doesnt look like any images are requested from s3. (I also tried without the s3 plugin which didnt change the time for the query)
When I look at the example orthanc server the series metadata seems to be a lot faster. Are there any orther settings which I am missing?


You might want to check DB latency:



Thank you!
Increasing the IndexConnectionsCount in the postgres plugin dramtically improved the issue