add thread/date multi-col SQLite indices

Closes #3880
// FREEBIE
This commit is contained in:
Jake McGinty
2015-08-04 13:37:22 -07:00
committed by Moxie Marlinspike
parent 107e202ab4
commit edc47247f9
5 changed files with 28 additions and 15 deletions
@@ -83,7 +83,8 @@ public class SmsDatabase extends MessagingDatabase {
"CREATE INDEX IF NOT EXISTS sms_read_index ON " + TABLE_NAME + " (" + READ + ");",
"CREATE INDEX IF NOT EXISTS sms_read_and_thread_id_index ON " + TABLE_NAME + "(" + READ + "," + THREAD_ID + ");",
"CREATE INDEX IF NOT EXISTS sms_type_index ON " + TABLE_NAME + " (" + TYPE + ");",
"CREATE INDEX IF NOT EXISTS sms_date_sent_index ON " + TABLE_NAME + " (" + DATE_SENT + ");"
"CREATE INDEX IF NOT EXISTS sms_date_sent_index ON " + TABLE_NAME + " (" + DATE_SENT + ");",
"CREATE INDEX IF NOT EXISTS sms_thread_date_index ON " + TABLE_NAME + " (" + THREAD_ID + ", " + DATE_RECEIVED + ");"
};
private static final String[] MESSAGE_PROJECTION = new String[] {