Optimize chat history query. Helps #1890

This commit is contained in:
Gabe Kangas
2022-05-01 00:07:33 -07:00
parent 8a343d0324
commit 2c47ddeef0
2 changed files with 2 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ func (ds *Datastore) Setup() {
"key" string NOT NULL PRIMARY KEY,
"value" BLOB,
"timestamp" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL
);`
);CREATE INDEX IF NOT EXISTS messages_timestamp_index ON messages(timestamp);`
stmt, err := ds.DB.Prepare(createTableSQL)
if err != nil {