-
Notifications
You must be signed in to change notification settings - Fork 214
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
[Merged by Bors] - Add rowid to tables with inefficient clustered indices #5394
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5394 +/- ##
=========================================
+ Coverage 77.4% 77.6% +0.1%
=========================================
Files 265 265
Lines 30894 30928 +34
=========================================
+ Hits 23942 24012 +70
+ Misses 5431 5393 -38
- Partials 1521 1523 +2 ☔ View full report in Codecov by Sentry. |
what do you think about removing rowid from activesets table? |
@dshulyak it can be done but unless activesets are pruned, that will take outrageously long to time to complete. Also, forgot to mention that, but actually w/o updating activesets, the database size increase (before vacuum) is not that big currently. So we can either do the full update after the pruning is done and in this case I can add activesets table update to this PR, or we can update activesets in a separate PR that we can apply after pruning. |
we can safely drop all activesets before epoch 12 (current epoch) |
That will tremendously help with cache warmup step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason not to merge it? i was using it for quite some time now, probably once you posted it.
sql/migrations/state/0009_rowid.sql
Outdated
@@ -0,0 +1,105 @@ | |||
DROP INDEX atxs_by_pubkey_by_epoch_desc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think 0009 is taken now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
11e890d
to
adb2962
Compare
Stop using WITHOUT ROWID for tables with large row size
bors merge |
## Motivation `WITHOUT ROWID` doesn't work well for table rows over about 1/20th the size of a database page (50 bytes for 1KiB pages). This causes slower database access and increased disk usage. ## Changes Remove WITHOUT ROWID from problematic tables, add integer `n` column (also serving as rowid) for forthcoming syncv2 changes ## Test Plan **TODO**: verify that mainnet nodes function correctly after migration ## TODO - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update [changelog](../CHANGELOG.md) as needed
Build failed: |
bors merge |
## Motivation `WITHOUT ROWID` doesn't work well for table rows over about 1/20th the size of a database page (50 bytes for 1KiB pages). This causes slower database access and increased disk usage. ## Changes Remove WITHOUT ROWID from problematic tables, add integer `n` column (also serving as rowid) for forthcoming syncv2 changes ## Test Plan **TODO**: verify that mainnet nodes function correctly after migration ## TODO - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update [changelog](../CHANGELOG.md) as needed
Pull request successfully merged into develop. Build succeeded: |
`WITHOUT ROWID` doesn't work well for table rows over about 1/20th the size of a database page (50 bytes for 1KiB pages). This causes slower database access and increased disk usage. Remove WITHOUT ROWID from problematic tables, add integer `n` column (also serving as rowid) for forthcoming syncv2 changes **TODO**: verify that mainnet nodes function correctly after migration - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update [changelog](../CHANGELOG.md) as needed
`WITHOUT ROWID` doesn't work well for table rows over about 1/20th the size of a database page (50 bytes for 1KiB pages). This causes slower database access and increased disk usage. Remove WITHOUT ROWID from problematic tables, add integer `n` column (also serving as rowid) for forthcoming syncv2 changes **TODO**: verify that mainnet nodes function correctly after migration - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update [changelog](../CHANGELOG.md) as needed
Motivation
WITHOUT ROWID
doesn't work well for table rows over about 1/20th the size of a database page (50 bytes for 1KiB pages). This causes slower database access and increased disk usage.Changes
Remove WITHOUT ROWID from problematic tables, add integer
n
column (also serving as rowid) for forthcoming syncv2 changesTest Plan
TODO: verify that mainnet nodes function correctly after migration
TODO