0xMiden / 0xMiden/node

Look into `WITHOUT ROWID` again

未关闭
#1,967 3 条评论 0 个 reaction 已指派 2 人 已被 @kkovaacs 认领 在 GitHub 查看
store
主要语言
Rust
星标
104
派生
138
平均合并
1 天 13 小时
30 天内合并 PR
56

描述

Quite a few of our tables use `WITHOUT ROWID`. While this can be an improvement in many situations, it can also lead to bloat if not used with care.

As a short summary, for tables with non-integer PK, an integer rowid is automatically created. `WITHOUT ROWID` prevents this from being done.

This _can_ be expensive, especially if there is no covering index (an index which includes all columns). What occurs is that indices and FK now contain a copy of the PK -- which may or may not be large. If the table has a `rowid`, then the `rowid` is used instead -- which is an integer and therefore smaller and faster to compare and evaluate.

We should look into our `WITHOUT ROWID` usage again, and confirm that its being used appropriately.

This is probably not urgent.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。