I was really amazed with plots in Orthanc twitter about postgresql-plugin performance. Mostly because it looks like import speed doesn’t depends on data-base size.
But after I’ve imported a part of our CT database (about 400k instances, 248GB) import speed have been decreased from 20 images/s to 4 images/s.
I’m not postresql expert so my postgres.conf may be not optimal, but it doesn’t seems then any changes in buffer and chunks sizes helps.
Also I’ve find some suspicious in stats log.
SELECT CAST(SUM(compressedSize) AS BIGINT) FROM AttachedFiles
This query occurs during each import operation and it takes about 0.2s to complete it.
Is there a way to speed up import procedure, without casting multiframe dicoms?
Without this assert transfer speed increases to 30 images/s.
Do we really need to check storage size after each transaction? Is it safe to pass it?
I’m worry because I never do anything in c++, and two slashes I placed to comment assertion, are my first expirience of writing c++ code)
These calls are there to ensure some invariants during development, and are automatically disabled in release builds (in which the “NDEBUG” macro is set).
Please make sure to set the option “-DCMAKE_BUILD_TYPE=Release” while invoking CMake, this will turn off all these safety checks and will bring full speed to Orthanc.