aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore_sqlite.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-03 20:59:58 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-03 20:59:58 +0000
commitba47d9ea31c6635578365484b993f252d7c2d022 (patch)
tree5c41f5faa60b0b1fa2224b1e293394bc91e6f053 /src/datastore/plugin_datastore_sqlite.c
parentdd1dcb51fe9ad99b0f81598d4045d2e957834843 (diff)
downloadgnunet-ba47d9ea31c6635578365484b993f252d7c2d022.tar.gz
gnunet-ba47d9ea31c6635578365484b993f252d7c2d022.zip
improve API, speed up mysql
Diffstat (limited to 'src/datastore/plugin_datastore_sqlite.c')
-rw-r--r--src/datastore/plugin_datastore_sqlite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 5036004b2..f551f048d 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -186,7 +186,7 @@ create_indices (sqlite3 * dbh)
186 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_comb ON gn090 (anonLevel ASC,expire ASC,prio,type,hash)", 186 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_comb ON gn090 (anonLevel ASC,expire ASC,prio,type,hash)",
187 NULL, NULL, NULL)) || 187 NULL, NULL, NULL)) ||
188 (SQLITE_OK != 188 (SQLITE_OK !=
189 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_anon_type_exp ON gn090 (anonLevel ASC,type,hash)", 189 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_anon_type_hash ON gn090 (anonLevel ASC,type,hash)",
190 NULL, NULL, NULL)) || 190 NULL, NULL, NULL)) ||
191 (SQLITE_OK != 191 (SQLITE_OK !=
192 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire ASC)", 192 sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire ASC)",
@@ -357,7 +357,7 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg,
357 &plugin->selExpi) != SQLITE_OK) || 357 &plugin->selExpi) != SQLITE_OK) ||
358 (sq_prepare (plugin->dbh, 358 (sq_prepare (plugin->dbh,
359 "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ " 359 "SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ "
360 "FROM gn090 INDEXED BY idx_anon_type_exp " 360 "FROM gn090 INDEXED BY idx_anon_type_hash "
361 "WHERE (anonLevel = 0 AND type=?1) " 361 "WHERE (anonLevel = 0 AND type=?1) "
362 "ORDER BY hash DESC LIMIT 1 OFFSET ?2", 362 "ORDER BY hash DESC LIMIT 1 OFFSET ?2",
363 &plugin->selZeroAnon) != SQLITE_OK) || 363 &plugin->selZeroAnon) != SQLITE_OK) ||