Optimize chat history query. Helps #1890
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user