mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 02:36:23 -04:00
Added index in database for column grpId in table MESSAGES.
This commit is contained in:
parent
b8edb75895
commit
442ec2337f
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
#define GRP_LAST_POST_UPDATE_TRIGGER std::string("LAST_POST_UPDATE")
|
#define GRP_LAST_POST_UPDATE_TRIGGER std::string("LAST_POST_UPDATE")
|
||||||
|
|
||||||
|
#define MSG_INDEX_GRPID std::string("INDEX_MESSAGES_GRPID")
|
||||||
|
|
||||||
// generic
|
// generic
|
||||||
#define KEY_NXS_FILE std::string("nxsFile")
|
#define KEY_NXS_FILE std::string("nxsFile")
|
||||||
|
@ -274,6 +275,8 @@ void RsDataService::initialise(){
|
||||||
" UPDATE " + GRP_TABLE_NAME + " SET " + KEY_GRP_LAST_POST + "= new."
|
" UPDATE " + GRP_TABLE_NAME + " SET " + KEY_GRP_LAST_POST + "= new."
|
||||||
+ KEY_RECV_TS + " WHERE " + KEY_GRP_ID + "=new." + KEY_GRP_ID + ";"
|
+ KEY_RECV_TS + " WHERE " + KEY_GRP_ID + "=new." + KEY_GRP_ID + ";"
|
||||||
+ std::string("END;"));
|
+ std::string("END;"));
|
||||||
|
|
||||||
|
mDb->execSQL("CREATE INDEX IF NOT EXISTS " + MSG_INDEX_GRPID + " ON " + MSG_TABLE_NAME + "(" + KEY_GRP_ID + ");");
|
||||||
}
|
}
|
||||||
|
|
||||||
RsGxsGrpMetaData* RsDataService::locked_getGrpMeta(RetroCursor &c)
|
RsGxsGrpMetaData* RsDataService::locked_getGrpMeta(RetroCursor &c)
|
||||||
|
@ -1286,6 +1289,7 @@ int RsDataService::resetDataStore()
|
||||||
delete mit->second;
|
delete mit->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mDb->execSQL("DROP INDEX " + MSG_INDEX_GRPID);
|
||||||
mDb->execSQL("DROP TABLE " + MSG_TABLE_NAME);
|
mDb->execSQL("DROP TABLE " + MSG_TABLE_NAME);
|
||||||
mDb->execSQL("DROP TABLE " + GRP_TABLE_NAME);
|
mDb->execSQL("DROP TABLE " + GRP_TABLE_NAME);
|
||||||
mDb->execSQL("DROP TRIGGER " + GRP_LAST_POST_UPDATE_TRIGGER);
|
mDb->execSQL("DROP TRIGGER " + GRP_LAST_POST_UPDATE_TRIGGER);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue