Removes the account debits/credits posted/pending indexes #1505
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removes the account debits/credits posted/pending indexes, as they're too expensive for little practical benefits: If the user ever needs to query accounts by the balance, it is more likely that they will need to filter by the net debit/credit balance and not by the accumulated balance as we index it today.
If it becomes a use-case, we can add them in the future as derived indexes.
On My Machine™, it reduced ~300MiB of memory and increased +15% in TPS.
1258 batches in 46.94 s load offered = 1000000 tx/s load accepted = 213039 tx/s batch latency p1 = 0 ms batch latency p10 = 8 ms batch latency p20 = 8 ms batch latency p30 = 8 ms batch latency p40 = 10 ms batch latency p50 = 16 ms batch latency p60 = 19 ms batch latency p70 = 24 ms batch latency p80 = 32 ms batch latency p90 = 39 ms batch latency p95 = 49 ms batch latency p99 = 666 ms batch latency p100 = 852 ms
1265 batches in 38.66 s load offered = 1000000 tx/s load accepted = 258678 tx/s batch latency p1 = 0 ms batch latency p10 = 5 ms batch latency p20 = 7 ms batch latency p30 = 8 ms batch latency p40 = 8 ms batch latency p50 = 13 ms batch latency p60 = 18 ms batch latency p70 = 21 ms batch latency p80 = 28 ms batch latency p90 = 37 ms batch latency p95 = 44 ms batch latency p99 = 515 ms batch latency p100 = 775 ms
Let's do that after #1503 so we can compare both.