Mercurial > hg > orthanc-databases
comparison PostgreSQL/Plugins/PostgreSQLIndex.cpp @ 15:dfc7002add9c
log: warning about index creation duration
author | am@osimis.io |
---|---|
date | Tue, 10 Jul 2018 07:15:13 +0200 |
parents | 927264a0c137 |
children | 9e419261f1c9 38e23471d132 |
comparison
equal
deleted
inserted
replaced
14:9774802fd05f | 15:dfc7002add9c |
---|---|
127 * https://www.postgresql.org/docs/current/static/pgtrgm.html | 127 * https://www.postgresql.org/docs/current/static/pgtrgm.html |
128 * https://bitbucket.org/sjodogne/orthanc/issues/47/index-improvements-for-pg-plugin | 128 * https://bitbucket.org/sjodogne/orthanc/issues/47/index-improvements-for-pg-plugin |
129 **/ | 129 **/ |
130 try | 130 try |
131 { | 131 { |
132 LOG(INFO) << "Trying to enable trigram matching on the PostgreSQL database to speed up wildcard searches"; | 132 LOG(INFO) << "Trying to enable trigram matching on the PostgreSQL database to speed up wildcard searches. This may take several minutes"; // we've observed 9 minutes on DB with 100000 studies |
133 db->Execute( | 133 db->Execute( |
134 "CREATE EXTENSION pg_trgm; " | 134 "CREATE EXTENSION pg_trgm; " |
135 "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);"); | 135 "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);"); |
136 | 136 |
137 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1); | 137 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1); |