-
Notifications
You must be signed in to change notification settings - Fork 11
PoC: Optimize key creation #502
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
Conversation
22dd143
to
2dd1e74
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## TDE_REL_17_STABLE #502 +/- ##
====================================================
Coverage ? 82.24%
====================================================
Files ? 25
Lines ? 3199
Branches ? 519
====================================================
Hits ? 2631
Misses ? 457
Partials ? 111
🚀 New features to boost your workflow:
|
I wonder if we should explore more drastic options, such as having one key file per relation, to just remove the issue of having to scan the key file completely. It feels like it's always going to be a bottle neck when dealing with a lot of tables (ie, large key files) |
Definitely, but later :) |
Another idea is to always add keys to the end of the file and take the cost while reading instead. Not sure that's what we want to do though depending on what we want to optimize for. |
2dd1e74
to
90a0e0e
Compare
We forgot to have a check against trying to delete leftover SMGR keys for temporary tables which is a useless operation since they are store in memory. Additionally we forgot to prevent WAL from being written when creating or removing a key in smgrcreate() for temporary tables.
90a0e0e
to
db898dc
Compare
Part of this has already been merged as #529. The rest is for another day. |
This optimizes key creation in both when doing it and in the WAL replay. Plus fixes a bug when we did unnecessary work when working with temporary table.
Optimizations:
fread()
instead ofpread()
to reduce number of syscalls