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

rowid #169

Open
jayvdb opened this issue Nov 20, 2023 · 0 comments
Open

rowid #169

jayvdb opened this issue Nov 20, 2023 · 0 comments

Comments

@jayvdb
Copy link
Collaborator

jayvdb commented Nov 20, 2023

sqlite: https://www.sqlite.org/rowidtable.html "rowid"
pg: https://www.postgresql.org/docs/current/ddl-system-columns.html "ctid"
oracle: https://stackoverflow.com/questions/2701782/rowid-oracle-any-use-for-it "rowid"

If we dont have any use for rowid, we could amend the sqlite DDL to use "without rowid", supported since 3.8.2 (2013-12-06) for the main tables. We can also do this on the Many tables if we add a better constraint on them.

How could we use it?
It could be used as a "order by" column for stable ordering of query results.
It could be used internally to perform DML on rows, as rowid is quicker than primary keys.

It shouldnt be stored in the database, so it cant be used instead of a primary key, only in addition to primary keys.

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