aboutsummaryrefslogtreecommitdiff
path: root/src/datastore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-09-30 21:51:58 +0200
committerChristian Grothoff <christian@grothoff.org>2017-09-30 21:52:07 +0200
commit60374f075270f8489e430c2967d36023f26ea2ef (patch)
tree0ab03c52263f17990159c61ed3b185efc22a0440 /src/datastore
parent6570a7980a945cd3e6484baa8777512506b9ba49 (diff)
downloadgnunet-60374f075270f8489e430c2967d36023f26ea2ef.tar.gz
gnunet-60374f075270f8489e430c2967d36023f26ea2ef.zip
more aggressive index creation
Diffstat (limited to 'src/datastore')
-rw-r--r--src/datastore/plugin_datastore_sqlite.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 77b8409cd..2d539cb19 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -185,21 +185,22 @@ static void
185create_indices (sqlite3 * dbh) 185create_indices (sqlite3 * dbh)
186{ 186{
187 /* create indices */ 187 /* create indices */
188 if ((SQLITE_OK != 188 if (0 !=
189 (SQLITE_OK !=
189 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn091 (hash)", 190 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn091 (hash)",
190 NULL, NULL, NULL)) || 191 NULL, NULL, NULL)) +
191 (SQLITE_OK != 192 (SQLITE_OK !=
192 sqlite3_exec (dbh, 193 sqlite3_exec (dbh,
193 "CREATE INDEX IF NOT EXISTS idx_anon_type ON gn091 (anonLevel ASC,type)", 194 "CREATE INDEX IF NOT EXISTS idx_anon_type ON gn091 (anonLevel ASC,type)",
194 NULL, NULL, NULL)) || 195 NULL, NULL, NULL)) +
195 (SQLITE_OK != 196 (SQLITE_OK !=
196 sqlite3_exec (dbh, 197 sqlite3_exec (dbh,
197 "CREATE INDEX IF NOT EXISTS idx_expire ON gn091 (expire ASC)", 198 "CREATE INDEX IF NOT EXISTS idx_expire ON gn091 (expire ASC)",
198 NULL, NULL, NULL)) || 199 NULL, NULL, NULL)) +
199 (SQLITE_OK != 200 (SQLITE_OK !=
200 sqlite3_exec (dbh, 201 sqlite3_exec (dbh,
201 "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn091 (repl,rvalue)", 202 "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn091 (repl,rvalue)",
202 NULL, NULL, NULL))) 203 NULL, NULL, NULL)) )
203 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "sqlite", 204 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "sqlite",
204 "Failed to create indices: %s\n", sqlite3_errmsg (dbh)); 205 "Failed to create indices: %s\n", sqlite3_errmsg (dbh));
205} 206}