aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore_sqlite.c
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2011-08-03 20:59:58 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2011-08-03 20:59:58 +0000
commit634a0c79b64ca0cb75e147ff6d234f12965ad74b (patch)
tree5c41f5faa60b0b1fa2224b1e293394bc91e6f053 /src/datastore/plugin_datastore_sqlite.c
parent5459d588a957af7652b95d4486a02b8dc7bff01d (diff)
improve API, speed up mysql
git-svn-id: https://gnunet.org/svn/gnunet@16350 140774ce-b5e7-0310-ab8b-a85725594a96
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 5036004b27..f551f048d6 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -186,7 +186,7 @@ create_indices (sqlite3 * dbh)
sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_comb ON gn090 (anonLevel ASC,expire ASC,prio,type,hash)",
NULL, NULL, NULL)) ||
(SQLITE_OK !=
- sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_anon_type_exp ON gn090 (anonLevel ASC,type,hash)",
+ sqlite3_exec (dbh, "CREATE INDEX IF NOT EXISTS idx_anon_type_hash ON gn090 (anonLevel ASC,type,hash)",
NULL, NULL, NULL)) ||
(SQLITE_OK !=
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,
&plugin->selExpi) != SQLITE_OK) ||
(sq_prepare (plugin->dbh,
"SELECT type,prio,anonLevel,expire,hash,value,_ROWID_ "
- "FROM gn090 INDEXED BY idx_anon_type_exp "
+ "FROM gn090 INDEXED BY idx_anon_type_hash "
"WHERE (anonLevel = 0 AND type=?1) "
"ORDER BY hash DESC LIMIT 1 OFFSET ?2",
&plugin->selZeroAnon) != SQLITE_OK) ||