Mercurial > hg > orthanc-databases
comparison PostgreSQL/Plugins/PostgreSQLIndex.cpp @ 16:9e419261f1c9
mysql storage area working
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Jul 2018 10:10:35 +0200 |
parents | dfc7002add9c |
children | aacb651833f5 |
comparison
equal
deleted
inserted
replaced
15:dfc7002add9c | 16:9e419261f1c9 |
---|---|
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. This may take several minutes"; // we've observed 9 minutes on DB with 100000 studies | 132 // We've observed 9 minutes on DB with 100000 studies |
133 LOG(INFO) << "Trying to enable trigram matching on the PostgreSQL database " | |
134 << "to speed up wildcard searches. This may take several minutes"; | |
135 | |
133 db->Execute( | 136 db->Execute( |
134 "CREATE EXTENSION pg_trgm; " | 137 "CREATE EXTENSION pg_trgm; " |
135 "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);"); | 138 "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);"); |
136 | 139 |
137 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1); | 140 SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1); |
138 } | 141 } |
139 catch (Orthanc::OrthancException&) | 142 catch (Orthanc::OrthancException&) |
140 { | 143 { |
141 LOG(WARNING) << "Performance warning: Your PostgreSQL server does not support trigram matching"; | 144 LOG(WARNING) << "Performance warning: Your PostgreSQL server does " |
142 LOG(WARNING) << "-> Consider installing the \"pg_trgm\" extension on the PostgreSQL server, e.g. on Debian: sudo apt install postgresql-contrib"; | 145 << "not support trigram matching"; |
146 LOG(WARNING) << "-> Consider installing the \"pg_trgm\" extension on the " | |
147 << "PostgreSQL server, e.g. on Debian: sudo apt install postgresql-contrib"; | |
143 } | 148 } |
144 } | 149 } |
145 | 150 |
146 if (revision != 1) | 151 if (revision != 1) |
147 { | 152 { |