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

Potential missing index for larger amounts of data in character_wallet_journals #873

Open
kwazulueve opened this issue Aug 24, 2022 · 1 comment
Assignees
Labels
core/data Things tied to database structure

Comments

@kwazulueve
Copy link

  • Problem: High database load

In our table character_wallet_journals we have over 10 million rows, quite a few characters having 100 k+ rows, and some individuals having over 500 k entries. There is a query (example shown below) that causes significant load on the mysql database, possibly to update the value of the corresponding character entry in character_wallet_balances (but I do not know that certain)

MySQLWorkbench_2022-08-25_00-32-27.

I've manually added an extra index (KEY idx_character_wallet_journals_character_id_date (character_id,date)) that completely removes these heavy queries and brings down the server load.

@warlof warlof added the core/data Things tied to database structure label Aug 25, 2022
@warlof warlof self-assigned this Aug 25, 2022
@warlof
Copy link
Member

warlof commented Aug 25, 2022

hi @kwazulueve

I've been able to confirm this. I've not been able to find what is generating this exact query though.
Wallet table are paginating result using limit 10 offset X where X is the current page * 10.

Without your index

image

With your index

image

Update will be shipped on next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/data Things tied to database structure
Projects
None yet
Development

No branches or pull requests

2 participants