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

History-Free RelStorage Ineligible for HOT optimization #440

Open
jamadden opened this issue Feb 3, 2021 · 0 comments
Open

History-Free RelStorage Ineligible for HOT optimization #440

jamadden opened this issue Feb 3, 2021 · 0 comments

Comments

@jamadden
Copy link
Member

jamadden commented Feb 3, 2021

PostgreSQL has an optimization called HOT that reduces the cost of updates in an MVCC environment.

For it to work, the columns that are being updated cannot be indexed.

History-free RelStorage will update existing rows when objects change, but one of the columns updated is the associated transaction ID. That column is indexed, making us ineligible for this optimization.

It would be interesting to know how much of a difference this optimization makes in benchmarks. It's possible that we rarely use that index (off hand, I think it may be mostly used for iteration, which is rare?). If the benchmarks show significant improvements, it may be worth dropping if we can confirm that it is rarely used.

At the least, this should be documented as knowing that HOT isn't used can help in capacity planning.

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

No branches or pull requests

1 participant