# Orthanc takes long time to return list of studies

**URL:** https://discourse.orthanc-server.org/t/orthanc-takes-long-time-to-return-list-of-studies/2735
**Category:** Google Groups archive
**Created:** [December 9, 2021, 10:13am UTC](https://discourse.orthanc-server.org/t/orthanc-takes-long-time-to-return-list-of-studies/2735 "2021-12-09T10:13:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Christopher](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@Christopher](https://discourse.orthanc-server.org/u/Christopher)
#### Post date: [December 9, 2021, 10:13am UTC](https://discourse.orthanc-server.org/t/orthanc-takes-long-time-to-return-list-of-studies/2735/1 "2021-12-09T10:13:59Z")

</div>

Hi authors,

I observed that Orthanc (with PostgresSSQLIndex enabled) took very long time (~ 2 minutes) to return list of studies. I use this API for getting studies : localhost/8042/studies?since=0&limit=100.  
My Orthanc has ~5 millions of instances and ~130.000 of studies  
Here is the statistics of orthanc (via api localhost:8042/statistics)

{ “CountInstances” : 5263383, “CountPatients” : 48799, “CountSeries” : 206031, “CountStudies” : 130605, “TotalDiskSize” : “4487611508380”, “TotalDiskSizeMB” : 4279719, “TotalUncompressedSize” : “4487611508380”, “TotalUncompressedSizeMB” : 4279719 }

a ![abc.png](https://discourse.orthanc-server.org/uploads/default/original/1X/0adc45365f9d97bd359970a370eb989afcceb565.png)  
My question is that is there any API for getting studies faster ? I dont think verbose log can show the statistics of this api , so I dont attach it here.

---

<div class="post-metadata">

### Author: ![Alain\_Mazy1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Alain\_Mazy1](https://discourse.orthanc-server.org/u/Alain_Mazy1)
#### Post date: [December 10, 2021, 3:23pm UTC](https://discourse.orthanc-server.org/t/orthanc-takes-long-time-to-return-list-of-studies/2735/2 "2021-12-10T15:23:48Z")

</div>

Hi Christopher,

No, there’s no faster way to list the studies.

For such large databases, make sure to use a DB server, e.g Postgres, instead of SQLite.

Best regards,

Alain

![abc.png](https://discourse.orthanc-server.org/uploads/default/original/1X/0adc45365f9d97bd359970a370eb989afcceb565.png)

---

<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: [December 16, 2021, 3:01pm UTC](https://discourse.orthanc-server.org/t/orthanc-takes-long-time-to-return-list-of-studies/2735/3 "2021-12-16T15:01:55Z")

</div>

Hello,

A call to “/studies” should run quickly on Orthanc 1.9.7 (the latest version at the time of writing), even with 100k studies, especially if you use “limit=100”.

Make sure to carefully follow the guidelines for best scalability of Orthanc:

[https://book.orthanc-server.com/faq/scalability.html](https://book.orthanc-server.com/faq/scalability.html)

Sébastien-

---

<div class="post-metadata">

### Author: ![Christopher](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@Christopher](https://discourse.orthanc-server.org/u/Christopher)
#### Post date: [December 18, 2021, 9:40am UTC](https://discourse.orthanc-server.org/t/orthanc-takes-long-time-to-return-list-of-studies/2735/4 "2021-12-18T09:40:33Z")

</div>

Thanks Sebatien,  
Yes I am using orthanc version 1.9.7 (contained in docker) with Indexer Plugin and using PostgreSQL index plugin. I am surprised too.
