changeset 20:aacb651833f5

merge
author am@osimis.io
date Tue, 10 Jul 2018 11:08:19 +0200
parents 38e23471d132 (diff) c7c54993a92e (current diff)
children 2e5d2c69d4f9
files PostgreSQL/Plugins/PostgreSQLIndex.cpp
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/PostgreSQL/NEWS	Tue Jul 10 10:40:39 2018 +0200
+++ b/PostgreSQL/NEWS	Tue Jul 10 11:08:19 2018 +0200
@@ -1,6 +1,13 @@
 Pending changes in the mainline
 ===============================
 
+Important remark when upgrading from an older version of the Plugin:
+* The plugin will create a new index to improve search performances.
+  This can take several minutes at Orthanc startup.  Orthanc will not
+  be available during this period.
+  On a 100000 studies DB, we've observed that the creation of this index 
+  took around 10 minutes.
+
 * Migration into the "orthanc-databases" repository
 * Full refactoring to share code with MySQL
 * Fix issue 41 (Additional range IdentifierConstraintType in Orthanc)
--- a/PostgreSQL/Plugins/PostgreSQLIndex.cpp	Tue Jul 10 10:40:39 2018 +0200
+++ b/PostgreSQL/Plugins/PostgreSQLIndex.cpp	Tue Jul 10 11:08:19 2018 +0200
@@ -130,7 +130,7 @@
         try
         {
           // We've observed 9 minutes on DB with 100000 studies
-          LOG(INFO) << "Trying to enable trigram matching on the PostgreSQL database "
+          LOG(WARNING) << "Trying to enable trigram matching on the PostgreSQL database "
                     << "to speed up wildcard searches. This may take several minutes";
 
           db->Execute(
@@ -138,6 +138,7 @@
             "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);");
 
           SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1);
+          LOG(WARNING) << "Trigram index has been created";
         }
         catch (Orthanc::OrthancException&)
         {