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

minor optimization for get table, operation_id index #3368

Closed
botnumberseven opened this issue Oct 28, 2024 · 0 comments
Closed

minor optimization for get table, operation_id index #3368

botnumberseven opened this issue Oct 28, 2024 · 0 comments

Comments

@botnumberseven
Copy link

botnumberseven commented Oct 28, 2024

I have a node which is set to sync many paranets at the same time, MySQL consumes a decent amount of resources and I noticed this:

image

It does a lot of UPDATE to get table using operation_id in WHERE clause.
But the table is missing index on operation_id.

I've added index below and it helped to reduce time for these UPDATE to complete, as well as resource consumption a bit.
ALTER TABLE get ADD INDEX idx_operation_id (operation_id);

My get table is ~500k rows, so it makes sense that lack of index is visible now.

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

No branches or pull requests

2 participants