Created cached models for series, study, and patient to allow rapid query and retrieval of data
Orthanc 1.11 introduced the ability to cache an expanded set of DICOM tags in the database. This functionality allows for expanded queries and rapid retrieval of metadata without loading the original DICOM files (which is much slower).
Unfortunately, for large databases (thousands of studies, tens of thousands of series, and millions of instances), the performance is suboptimal. DICOMweb lookups for segmentation or specific patients using the OAI dataset (1.5 million total images) can require upwards of 60 to 90 seconds even when all relevant tags have been added to the database cache.
Part of the bottleneck may to be in the way in which the main DICOMtags are cached in the dmaindicomtags
and supporting tables. It looks as though complex queries involving dozens (or hundreds) of resources may involve multiple table scans (which can be costly on a large table).
This issue is intended as a tracking issue for building a set of index tables that can exist alongside the primary data tables and be used to improve the query time for large databases for series, study, and patient queries. The goal is to improve query on the OAI dataset to sub-second response times.
Background Information:
- Orthanc table structure SQL: https://hg.orthanc-server.com/orthanc-databases/file/tip/PostgreSQL/Plugins/PrepareIndex.sql
- Create DICOM resource instance: https://hg.orthanc-server.com/orthanc-databases/file/tip/PostgreSQL/Plugins/CreateInstance.sql