mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
perf: add missing index to optimize message list (#4055)
This commit is contained in:
parent
5feee83701
commit
87760f4a0d
3 changed files with 856 additions and 2 deletions
|
|
@ -83,8 +83,9 @@ import org.meshtastic.core.database.entity.TracerouteNodePositionEntity
|
|||
AutoMigration(from = 22, to = 23),
|
||||
AutoMigration(from = 23, to = 24),
|
||||
AutoMigration(from = 24, to = 25),
|
||||
AutoMigration(from = 25, to = 26),
|
||||
],
|
||||
version = 25,
|
||||
version = 26,
|
||||
exportSchema = true,
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,13 @@ data class PacketEntity(
|
|||
@Suppress("ConstructorParameterNaming")
|
||||
@Entity(
|
||||
tableName = "packet",
|
||||
indices = [Index(value = ["myNodeNum"]), Index(value = ["port_num"]), Index(value = ["contact_key"])],
|
||||
indices =
|
||||
[
|
||||
Index(value = ["myNodeNum"]),
|
||||
Index(value = ["port_num"]),
|
||||
Index(value = ["contact_key"]),
|
||||
Index(value = ["contact_key", "port_num", "received_time"]),
|
||||
],
|
||||
)
|
||||
data class Packet(
|
||||
@PrimaryKey(autoGenerate = true) val uuid: Long,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue