sqlite添加参数_sync=OFF

This commit is contained in:
刘祥超
2022-03-14 11:08:02 +08:00
parent ecbb11eee2
commit ce87fa25e7
3 changed files with 3 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ func (this *Task) Init() error {
remotelogs.Println("METRIC", "create data dir '"+dir+"'")
}
db, err := sql.Open("sqlite3", "file:"+dir+"/metric."+strconv.FormatInt(this.item.Id, 10)+".db?cache=shared&mode=rwc&_journal_mode=WAL")
db, err := sql.Open("sqlite3", "file:"+dir+"/metric."+strconv.FormatInt(this.item.Id, 10)+".db?cache=shared&mode=rwc&_journal_mode=WAL&_sync=OFF")
if err != nil {
return err
}