mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-28 07:51:42 +01:00
Use better index for story query.
This commit is contained in:
committed by
Alex Hart
parent
089d47936b
commit
c2f8261419
@@ -1703,7 +1703,7 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
|
||||
|
||||
return readableDatabase
|
||||
.select(DATE_SENT)
|
||||
.from(TABLE_NAME)
|
||||
.from("$TABLE_NAME INDEXED BY $INDEX_STORY_TYPE")
|
||||
.where("$IS_STORY_CLAUSE AND $THREAD_ID != ?", releaseChannelThreadId)
|
||||
.limit(1)
|
||||
.orderBy("$DATE_SENT ASC")
|
||||
|
||||
Reference in New Issue
Block a user