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

Optimize account_asset Index for improved performance #851

Merged

Conversation

frankTheTank72
Copy link
Member

In version 3.8.4, we re-evaluated the node's behavior on the testnet with PostgreSQL, SQLite, and MariaDB, focusing specifically on block 379106. This block featured 101 transactions utilizing DistributionToHolder, involving 10,327 accounts. These transactions resulted in:

  • 1,043,027 account balance updates, and
  • 1,043,027 smart token updates.

Our analysis revealed that the account_asset table was not optimized for this volume of updates with the current indices.
To address this, we adjusted an index to include the fields account_id, asset_id, and latest. This optimization significantly improves the performance of updates and queries on this table, especially in high-throughput scenarios.

We also re-orgnaized a bit the config file for a better view on the database settings.

Copy link
Member

@ohager ohager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ohager ohager merged commit 306d4cf into signum-network:develop Jan 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants