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

Don't use txid as primary key part #5

Open
elsirion opened this issue Apr 8, 2024 · 0 comments
Open

Don't use txid as primary key part #5

elsirion opened this issue Apr 8, 2024 · 0 comments

Comments

@elsirion
Copy link
Owner

elsirion commented Apr 8, 2024

We nearly never care about the txid, whereas the session index and item index in a session is a perfectly fine primary key for transactions too, is shorter and we even care about sesssion indices often (so it's practical if we don't have to join over transactions to find the session of a tx input/output).

FOREIGN KEY (federation_id, txid) REFERENCES transactions(federation_id, txid), -- This might be a bit too heavy of a foreign key? Maybe use rowid instead?

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