mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
⚡ Reduce disk reads when editing documents https://github.com/siyuan-note/siyuan/issues/10961
This commit is contained in:
parent
616821a090
commit
5e99a37242
1 changed files with 2 additions and 2 deletions
|
|
@ -971,13 +971,13 @@ func deleteBlocksByIDs(tx *sql.Tx, ids []string) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ftsIDsMatch := strings.Join(ftsIDs, " OR ")
|
ftsIDsMatch := strings.Join(ftsIDs, " OR ")
|
||||||
stmt = "DELETE FROM blocks_fts WHERE rowid IN (SELECT ROWID FROM blocks_fts WHERE blocks_fts MATCH 'id:(" + ftsIDsMatch + ")')"
|
stmt = "DELETE FROM blocks_fts WHERE ROWID IN (SELECT ROWID FROM blocks_fts WHERE blocks_fts MATCH 'id:(" + ftsIDsMatch + ")')"
|
||||||
if err = execStmtTx(tx, stmt); nil != err {
|
if err = execStmtTx(tx, stmt); nil != err {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !caseSensitive {
|
if !caseSensitive {
|
||||||
stmt = "DELETE FROM blocks_fts_case_insensitive WHERE rowid IN (SELECT ROWID FROM blocks_fts_case_insensitive WHERE blocks_fts_case_insensitive MATCH 'id:(" + ftsIDsMatch + ")')"
|
stmt = "DELETE FROM blocks_fts_case_insensitive WHERE ROWID IN (SELECT ROWID FROM blocks_fts_case_insensitive WHERE blocks_fts_case_insensitive MATCH 'id:(" + ftsIDsMatch + ")')"
|
||||||
if err = execStmtTx(tx, stmt); nil != err {
|
if err = execStmtTx(tx, stmt); nil != err {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue