-
Notifications
You must be signed in to change notification settings - Fork 28
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
Research: Check range
type in Postgres and see if it could improve the new validator projection
#678
Comments
I implemented the
|
After implemented the TestnetOn Testnet, all blocks could be synced up in less than MainnetHowever on Mainnet, the performance seems getting worse when more data written in to DB. I ran it for around 13.5 hours, it synced up I did a speed test at around But I checked the DB and noticed a pattern that as the projection getting more data, the |
Found out the evil SQL.
SELECT COUNT(*)
FROM public.view_vd_validators
WHERE operator_address = 'crocncl1u5ryf5jwc2jhd9xyvmasfqzacxp03v8dcj8xry' AND lower(height) = 719959;
SELECT COUNT(*)
FROM public.view_vd_validators
WHERE operator_address = 'crocncl1u5ryf5jwc2jhd9xyvmasfqzacxp03v8dcj8xry' AND height = '[719959,)';
This SQL is used when updating validators, which is a common operation in mainnet. |
Final OutcomeTestnetSync up to latest height. Run the validation script to do the cross check. Performance: sync up to latest height within 2 days. Correctness: Picked 1000 height (from 1 to latest). All MainnetSync up to height Performance: sync up to this Correctness: Picked 1000 height (from 1 to 4232032). All ConclusionNow I am pretty confident at the projection's performance and correctess. The following task are to handle:
|
Task Details
This ticket is a follow-up on #669 .
The new validator projection performance against Crypto.org testnet is fine. But the performance against Crypto.org Mainnet is terrible.
We want to optimize the performance. So in this ticket I will do the following:
range
type. Apply it onDelegations
view.Definition of Done
The text was updated successfully, but these errors were encountered: