# /tools/metrics-prometheus blocks other http requests

**URL:** https://discourse.orthanc-server.org/t/tools-metrics-prometheus-blocks-other-http-requests/1841
**Category:** Google Groups archive
**Created:** [March 26, 2020, 3:18pm UTC](https://discourse.orthanc-server.org/t/tools-metrics-prometheus-blocks-other-http-requests/1841 "2020-03-26T15:18:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Cyril\_Oblikov](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/8baadc/32.png) [@Cyril\_Oblikov](https://discourse.orthanc-server.org/u/Cyril_Oblikov)
#### Post date: [March 26, 2020, 3:18pm UTC](https://discourse.orthanc-server.org/t/tools-metrics-prometheus-blocks-other-http-requests/1841/1 "2020-03-26T15:18:03Z")

</div>

Using mysql plugin for index and S3 for storage.  
6M entries in Resources table.

GET /tools/metrics-prometheus does some heavy sql requests such as:  
SELECT CAST(COALESCE(SUM(uncompressedSize), 0) AS UNSIGNED INTEGER) FROM AttachedFiles

All other Orthanc rest api requests freeze until metrics collection finishes.

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [March 30, 2020, 3:24pm UTC](https://discourse.orthanc-server.org/t/tools-metrics-prometheus-blocks-other-http-requests/1841/2 "2020-03-30T15:24:06Z")

</div>

Hello,

This is known limitation, as the MySQL plugin is not designed for speed right now. There are other pending changes related to performance in the mainline:  
[https://bitbucket.org/sjodogne/orthanc-databases/src/default/MySQL/NEWS](https://bitbucket.org/sjodogne/orthanc-databases/src/default/MySQL/NEWS)

If your focus is on performance, please switch to PostgreSQL, as explained in the Orthanc Book:  
[https://book.orthanc-server.com/faq/scalability.html](https://book.orthanc-server.com/faq/scalability.html)

Sébastien-
