0xMiden / 0xMiden/node

Look into `WITHOUT ROWID` again

Offen
#1,967 3 Kommentare 0 Reaktionen 2 zugewiesene Personen Beansprucht von @kkovaacs Auf GitHub ansehen
store
Vorherrschende Sprache
Rust
Sterne
104
Forks
138
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
56

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.