Skip to content

Improve block ref searching performance #11951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TCOTC opened this issue Jul 11, 2024 · 7 comments
Closed

Improve block ref searching performance #11951

TCOTC opened this issue Jul 11, 2024 · 7 comments
Assignees
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Jul 11, 2024

提高块引搜索性能

https://ld246.com/article/1720682769643

确实不快


描述:

3.1.0 已经重建索引, 使用半小时(浏览页面), 重启过几次, 检查过思源没有明显的错误和插件异常后

步骤:

任意页面上 输入 [[ 开始创建link

输入 test, 转圈3秒,才出来列表

image.png

siyuan.log报错

E 2024/07/11 15:13:13 block_ref_query.go:381: sql query failed: near "WHERE": syntax error
E 2024/07/11 15:13:17 block_ref_query.go:381: sql query failed: near "WHERE": syntax error
E 2024/07/11 15:17:21 block_ref_query.go:381: sql query failed: near "WHERE": syntax error
E 2024/07/11 15:18:58 block_ref_query.go:381: sql query failed: near "WHERE": syntax error // 这是上面输入 test这次的

如果这时候不做任何操作, 就停留在上图的状态, I/O ,cpu 都是高负载不停

image.png

image.png

红框这段就是查出列表后,啥也不干的状态.

@Jiangshuon
Copy link

数据库搜索相比之前也变慢了

@Jiangshuon
Copy link

@88250 d大,是恢复周更了吗,下周应该会更新吧

@88250
Copy link
Member

88250 commented Jul 11, 2024 via email

@Jiangshuon
Copy link

会的,但是后面不一定周更了。

---原始邮件--- 发件人: @.> 发送时间: 2024年7月11日(周四) 下午4:03 收件人: @.>; 抄送: @.@.>; 主题: Re: [siyuan-note/siyuan] 提高块引搜索性能 (Issue #11951) @88250 d大,是恢复周更了吗,下周应该会更新吧 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

好的,我的理解是,如果有比较影响使用的bug,就尽快更。没有的话,就不周更是吧

@88250
Copy link
Member

88250 commented Jul 11, 2024 via email

@88250
Copy link
Member

88250 commented Jul 14, 2024

E 2024/07/11 15:18:58 block_ref_query.go:381: sql query failed: near "WHERE": syntax error // 这是上面输入 test这次的

这个报错是因为配置的 工作空间/data/.siyuan/refsearchignore 有误,里面要写 WHERE 条件子句 才能符合 SQL 语法。

@88250 88250 self-assigned this Jul 14, 2024
@88250 88250 added this to the 3.1.1 milestone Jul 14, 2024
@88250 88250 changed the title 提高块引搜索性能 Improve block ref searching performance Jul 14, 2024
@88250 88250 closed this as completed Jul 14, 2024
@Temacc0531
Copy link

这个块引搜索优化完我这边好像没啥感知,还是刚索引完就挺快,隔天又变慢了😥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants