兄弟们,你们一个数据库最多使用到多少行,卡不卡顿?
相关帖子
-
- 其他回帖
-
模板运算越复杂、耗时越久,数据库就越卡,因为目前每次编辑都是整个数据库块的所有显示的条目都刷新一轮。
比如说这个模板,用了之后编辑数据库就会很卡:
.action{ if empty (index . "完成") } .action{ if index . "custom-avs" } .action{ $id := .id } 剩余 .action{ len (queryBlocks "with RECURSIVE finish_tree AS ( SELECT id, parent_id FROM blocks WHERE root_id = '?' and markdown like '* [x]%' and type = 'i' and subtype = 't' UNION ALL SELECT fi.id, fi.parent_id FROM blocks as fi INNER JOIN finish_tree as ft ON fi.parent_id = ft.id ) ,un_finish_parent AS ( SELECT id, parent_id FROM blocks WHERE root_id = '?' and type = 'l' and id in ( select parent_id from blocks where root_id = '?' and markdown like '* [ ]%' and type = 'i' and subtype = 't' ) ) select * from blocks where id not in (select parent_id from un_finish_parent ) and id not in (select id from finish_tree) and root_id = '?' and type = 'i' and subtype = 't'" $id $id $id $id ) } / 总共 .action{ len (queryBlocks "SELECT * FROM blocks WHERE root_id = '?' AND type = 'i' AND subtype = 't' AND id not in (SELECT parent_id FROM blocks WHERE type = 'l')" $id) } .action{ end } .action{ end }
2 回复 - 查看全部回帖
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于