Skip to content
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

without rowid #103

Open
samuelstroschein opened this issue Oct 16, 2024 — with Linear · 1 comment
Open

without rowid #103

samuelstroschein opened this issue Oct 16, 2024 — with Linear · 1 comment

Comments

Copy link
Member

Context

We define primary keys, there is no need for the implicit rowid column that sqlite sets.

https://www.sqlite.org/withoutrowid.html

Proposal

Use withoutrowid.

Copy link
Member Author

Moving this ticket to release candidate because:

  1. The data structure is not impacted
  2. Neither are APIs impacted
  3. Without ROW ID can have negative impacts on larger rows and update hooks don't work anymore
  4. SQLite recommends to implement without rowid at the end of the development cycle

A good strategy is to simply not worry about WITHOUT ROWID until near the end of product development, then go back and run tests to see if adding WITHOUT ROWID to tables with non-integer PRIMARY KEYs helps or hurts performance, and retaining the WITHOUT ROWID only in those cases where it helps.

[Source](https://www.sqlite.org/withoutrowid.html#:~:text=A%20good%20strategy%20is%20to%20simply%20not%20worry%20about%20WITHOUT%20ROWID%20until%20near%20the%20end%20of%20product%20development%2C%20then%20go%20back%20and%20run%20tests%20to%20see%20if%20adding%20WITHOUT%20ROWID%20to%20tables%20with%20non%2Dinteger%20PRIMARY%20KEYs%20helps%20or%20hurts%20performance%2C%20and%20retaining%20the%20WITHOUT%20ROWID%20only%20in%20those%20cases%20where%20it%20helps.)

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

No branches or pull requests

1 participant