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

Remove running_count and total_count columns from the missed_blocks table #549

Closed
4 tasks
nullpointer0x00 opened this issue Sep 19, 2024 · 0 comments · Fixed by #564
Closed
4 tasks

Remove running_count and total_count columns from the missed_blocks table #549

nullpointer0x00 opened this issue Sep 19, 2024 · 0 comments · Fixed by #564
Assignees

Comments

@nullpointer0x00
Copy link
Contributor

Summary

Remove running_count and total_count columns from the missed_blocks table.

Problem Definition

The running_count and total_count are no longer calculated or stored in the database as of this pull request. These calculations were removed due to significant performance drains, especially since they can be easily computed via query. The total_count can be derived by counting records where the block height is less than or equal to a given height, and running_count can be calculated from block heights that appear in sequence.

Additionally, these values were not used in any endpoints or other parts of the code; they were simply calculated and stored unnecessarily.

This issue will require a Flyway database update to remove the columns and the related code. The table currently holds over 8 million records, so dropping these columns could take a considerable amount of time.

Proposal

  1. Update Flyway to drop the running_count and total_count columns from the missed_blocks table.
  2. Remove any code references related to these columns.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant